author | Linus Torvalds <torvalds@linux-foundation.org> | |
Wed, 3 Jun 2009 01:34:01 +0000 (18:34 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 3 Jun 2009 07:49:50 +0000 (00:49 -0700) | ||
commit | ceff8e7adeed51024491deb4933f23db760e5641 | |
tree | c98b5de12111a6767b45f8e9f5f65ef7d1bb7299 | tree | snapshot |
parent | 433e972aeb5e485d2f7a7ac605a1c043822e25d9 | commit | diff |
Clean up and simplify rev_compare_tree()
This simplifies the logic of rev_compare_tree() by removing a special
case.
It does so by turning the special case of finding a diff to be "all new
files" into a more generic case of "all new" vs "all removed" vs "mixed
changes", so now the code is actually more powerful and more generic, and
the added symmetry actually makes it simpler too.
This makes no changes to any existing behavior, but apart from the
simplification it does make it possible to some day care about whether all
changes were just deletions if we want to. Which we may well want to for
merge handling.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This simplifies the logic of rev_compare_tree() by removing a special
case.
It does so by turning the special case of finding a diff to be "all new
files" into a more generic case of "all new" vs "all removed" vs "mixed
changes", so now the code is actually more powerful and more generic, and
the added symmetry actually makes it simpler too.
This makes no changes to any existing behavior, but apart from the
simplification it does make it possible to some day care about whether all
changes were just deletions if we want to. Which we may well want to for
merge handling.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
revision.c | diff | blob | history | |
revision.h | diff | blob | history |