Re: [PATCH 2/2] clone: use computed length in guess_dir_name

2015-08-05 Thread Sebastian Schuberth
On 8/5/2015 10:39, Jeff King wrote: > Commit 7e837c6 (clone: simplify string handling in > guess_dir_name(), 2015-07-09) changed clone to use > strip_suffix instead of hand-rolled pointer manipulation. > However, strip_suffix will strip from the end of a > NUL-terminated string, and we may have al

[PATCH 2/2] clone: use computed length in guess_dir_name

2015-08-05 Thread Jeff King
Commit 7e837c6 (clone: simplify string handling in guess_dir_name(), 2015-07-09) changed clone to use strip_suffix instead of hand-rolled pointer manipulation. However, strip_suffix will strip from the end of a NUL-terminated string, and we may have already stripped some characters (like directory