author | Junio C Hamano <junkio@cox.net> | |
Wed, 14 Mar 2007 20:18:15 +0000 (13:18 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 14 Mar 2007 23:21:19 +0000 (16:21 -0700) | ||
commit | dd47aa31339d2b8acdf909fd0067544c31cd9358 | |
tree | 276896d7178a26784ab2eaa86da22e974bbc12c1 | tree | snapshot |
parent | 0a4ba7f8c6140c516f0ee073a6b71d0db24d6242 | commit | diff |
try-to-simplify-commit: use diff-tree --quiet machinery.
This uses diff-tree --quiet machinery to terminate the internal
diff-tree between a commit and its parents via revs.pruning (not
revs.diffopt) as soon as we find enough about the tree change.
With respect to the optionally given pathspec, we are interested
if the tree of commit is identical to the parent's, only adds
new paths to the parent's, or there are other differences. As
soon as we find out that there is one such other kind of
difference, we do not have to compare the rest of the tree.
Because we do not call standard diff_addremove/diff_change, we
instruct the diff-tree machinery to stop early by setting
has_changes when we say we found the trees to be different.
Signed-off-by: Junio C Hamano <junkio@cox.net>
This uses diff-tree --quiet machinery to terminate the internal
diff-tree between a commit and its parents via revs.pruning (not
revs.diffopt) as soon as we find enough about the tree change.
With respect to the optionally given pathspec, we are interested
if the tree of commit is identical to the parent's, only adds
new paths to the parent's, or there are other differences. As
soon as we find out that there is one such other kind of
difference, we do not have to compare the rest of the tree.
Because we do not call standard diff_addremove/diff_change, we
instruct the diff-tree machinery to stop early by setting
has_changes when we say we found the trees to be different.
Signed-off-by: Junio C Hamano <junkio@cox.net>
revision.c | diff | blob | history |