Re: [PATCH] sha1_name: pass object name length to diagnose_invalid_sha1_path()

2013-03-17 Thread René Scharfe
Am 17.03.2013 08:10, schrieb Junio C Hamano: @@ -1158,16 +1159,16 @@ static void diagnose_invalid_sha1_path(const char *prefix, if (!get_tree_entry(tree_sha1, fullname, sha1, &mode)) { die("Path '%s' exists, but not '%s'

Re: [PATCH] sha1_name: pass object name length to diagnose_invalid_sha1_path()

2013-03-17 Thread Junio C Hamano
René Scharfe writes: > The only caller of diagnose_invalid_sha1_path() extracts a substring from > an object name by creating a NUL-terminated copy of the interesting part. > Add a length parameter to the function and thus avoid the need for an > allocation, thereby simplifying the code. > > Sign

[PATCH] sha1_name: pass object name length to diagnose_invalid_sha1_path()

2013-03-16 Thread René Scharfe
The only caller of diagnose_invalid_sha1_path() extracts a substring from an object name by creating a NUL-terminated copy of the interesting part. Add a length parameter to the function and thus avoid the need for an allocation, thereby simplifying the code. Signed-off-by: Rene Scharfe --- sha1