author | Junio C Hamano <gitster@pobox.com> | |
Wed, 5 Aug 2009 05:08:16 +0000 (22:08 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 5 Aug 2009 09:21:11 +0000 (02:21 -0700) | ||
commit | 26da1d78674204c482ec90905dd4de3f6bcd3c5f | |
tree | 3c565041ba6e432ff9064a1d8302f49ef33c2605 | tree | snapshot |
parent | 29796c6ccff3e70622398379fdcdfa3fe43333ac | commit | diff |
diff-index: keep the original index intact
When comparing the index and a tree, we used to read the contents of the
tree into stage #1 of the index and compared them with stage #0. In order
not to lose sight of entries originally unmerged in the index, we hoisted
them to stage #3 before reading the tree.
Commit d1f2d7e (Make run_diff_index() use unpack_trees(), not read_tree(),
2008-01-19) changed all this. These days, we instead use unpack_trees()
API to traverse the tree and compare the contents with the index, without
modifying the index at all. There is no reason to hoist the unmerged
entries to stage #3 anymore.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
When comparing the index and a tree, we used to read the contents of the
tree into stage #1 of the index and compared them with stage #0. In order
not to lose sight of entries originally unmerged in the index, we hoisted
them to stage #3 before reading the tree.
Commit d1f2d7e (Make run_diff_index() use unpack_trees(), not read_tree(),
2008-01-19) changed all this. These days, we instead use unpack_trees()
API to traverse the tree and compare the contents with the index, without
modifying the index at all. There is no reason to hoist the unmerged
entries to stage #3 anymore.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff-lib.c | diff | blob | history |