From: Johannes Sixt Date: Sat, 19 Jul 2008 09:32:45 +0000 (+0200) Subject: builtin-clone: rewrite guess_dir_name() X-Git-Tag: v1.6.0-rc0~23 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/b8c5db35fc23913d72c52d990d399b8ef66b646f?hp=b8c5db35fc23913d72c52d990d399b8ef66b646f builtin-clone: rewrite guess_dir_name() The function has to do three small and independent tasks, but all of them were crammed into a single loop. This rewrites the function entirely by unrolling these tasks. We also now use is_dir_sep(c) instead of c == '/' to increase portability. Signed-off-by: Johannes Sixt Signed-off-by: Junio C Hamano ---