author | Junio C Hamano <gitster@pobox.com> | |
Fri, 9 Jul 2010 00:27:43 +0000 (17:27 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 9 Jul 2010 00:27:43 +0000 (17:27 -0700) | ||
commit | b1f47514f207b0601de7b0936cf13b3c0ae70081 | |
tree | 351921dd5f5bec0f58804cd94f426006f81b6c38 | tree | snapshot |
parent | 29981380d03ffa63765dbeaea53a7ac9e8d6bc4f | commit | diff |
Fix "read-tree -m A B" priming the cache-tree
In 456156d a shortcut to priming the index tree reference was
introduced, but the justification for it was completely bogus.
"read-tree -m A B" is to take the index (and the working tree)
that is largely based on (but does not have to match exactly) A
and update it to B, while carrying the local change that does
not overlap the difference between A and B, so there is no reason
to expect that the resulting index should match the tree B.
Noticed and test provided by Heiko Voigt.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
In 456156d a shortcut to priming the index tree reference was
introduced, but the justification for it was completely bogus.
"read-tree -m A B" is to take the index (and the working tree)
that is largely based on (but does not have to match exactly) A
and update it to B, while carrying the local change that does
not overlap the difference between A and B, so there is no reason
to expect that the resulting index should match the tree B.
Noticed and test provided by Heiko Voigt.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-read-tree.c | diff | blob | history | |
t/t1001-read-tree-m-2way.sh | diff | blob | history |