Fix mkpath abuse in dwim_ref and dwim_log of sha1_name.c
authorAlex Riesen <raa.lkml@gmail.com>
Sun, 26 Oct 2008 22:07:24 +0000 (23:07 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 27 Oct 2008 05:10:28 +0000 (22:10 -0700)
commit94cc355287a7efc3eda76af6ae31f503a1ac098b
tree1e074ff609f880d031f25f5866dec1cad5eb6c3a
parent108bebeab31881654b7b0f1b5b393a6655d74d3f
Fix mkpath abuse in dwim_ref and dwim_log of sha1_name.c

Otherwise the function sometimes fail to resolve obviously correct
refnames, because the string data pointed to by "str" argument were
reused.

The change in dwim_log does not fix anything, just optimizes away
strcpy code as the path can be created directly in the available
buffer.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sha1_name.c