author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | |
Sun, 3 Dec 2006 19:42:47 +0000 (20:42 +0100) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Mon, 4 Dec 2006 08:55:12 +0000 (00:55 -0800) | ||
commit | aca085e577688108a2480b96a2f7077424a74e4d | |
tree | c5ffc1a20ac48ae96c013a9fc27520f1d78b1410 | tree | snapshot |
parent | 6173c197c9a23fa8594f18fd2c856407d4af31c1 | commit | diff |
git-mv: search more precisely for source directory in index
A move of a directory should find the entries in the index by
searching for the name _including_ the slash. Otherwise, the
directory can be shadowed by a file when it matches the prefix
and is lexicographically smaller, e.g. "ab.c" shadows "ab/".
Noticed by Sergey Vlasov.
[jc: added Sergey's original reproduction recipe as a test case
at the end of t7001.]
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
A move of a directory should find the entries in the index by
searching for the name _including_ the slash. Otherwise, the
directory can be shadowed by a file when it matches the prefix
and is lexicographically smaller, e.g. "ab.c" shadows "ab/".
Noticed by Sergey Vlasov.
[jc: added Sergey's original reproduction recipe as a test case
at the end of t7001.]
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-mv.c | diff | blob | history | |
t/t7001-mv.sh | diff | blob | history |