author | Clemens Buchacher <drizzd@aon.at> | |
Thu, 1 Jan 2009 20:54:32 +0000 (21:54 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 5 Jan 2009 20:46:35 +0000 (12:46 -0800) | ||
commit | 837e5fe95d9d6e597b748d338e45cca231f558fa | |
tree | 63509e66387ffc9a7a743ff69133fe17285ecefc | tree | snapshot |
parent | 6b9315d5a14b4d1389cff347fcfcb86624bbf645 | commit | diff |
unpack-trees: fix path search bug in verify_absent
Commit 0cf73755 (unpack-trees.c: assume submodules are clean during
check-out) changed an argument to verify_absent from 'path' to 'ce',
which is however shadowed by a local variable of the same name.
The bug triggers if verify_absent is used on a tree entry, for which
the index contains one or more subsequent directories of the same
length. The affected subdirectories are removed from the index. The
testcase included in this commit bisects to 55218834 (checkout: do not
lose staged removal), which reveals the bug in this case, but is
otherwise unrelated.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commit 0cf73755 (unpack-trees.c: assume submodules are clean during
check-out) changed an argument to verify_absent from 'path' to 'ce',
which is however shadowed by a local variable of the same name.
The bug triggers if verify_absent is used on a tree entry, for which
the index contains one or more subsequent directories of the same
length. The affected subdirectories are removed from the index. The
testcase included in this commit bisects to 55218834 (checkout: do not
lose staged removal), which reveals the bug in this case, but is
otherwise unrelated.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t1001-read-tree-m-2way.sh | diff | blob | history | |
unpack-trees.c | diff | blob | history |