sha1_name: pass object name length to diagnose_invalid_sha1_path()
commitb2981d06226ab0fdabf9110c3be7104110b307ae
authorRené Scharfe <rene.scharfe@lsrfire.ath.cx>
Sat, 16 Mar 2013 18:29:31 +0000 (16 19:29 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sun, 17 Mar 2013 07:10:51 +0000 (17 00:10 -0700)
treeaae8ba7d3933a96e6f6fb4c245d87a159209e446
parentea738e2da113567a430f3ab175d1759d26557e51
sha1_name: pass object name length to diagnose_invalid_sha1_path()

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 <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sha1_name.c