author | Johannes Sixt <johannes.sixt@telecom.at> | |
Sat, 19 Jul 2008 09:32:45 +0000 (11:32 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 19 Jul 2008 18:17:43 +0000 (11:17 -0700) | ||
commit | b8c5db35fc23913d72c52d990d399b8ef66b646f | |
tree | c8607c0851a2822d654c59fc715a7f0a277a68ad | tree | snapshot |
parent | fe77b6959c47e1eaec0c96599b2c5ce7907707ec | commit | diff |
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 <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
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 <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-clone.c | diff | blob | history |