Code

gitk: Add a command to compare two strings of commits
authorPaul Mackerras <paulus@samba.org>
Thu, 9 Apr 2009 12:10:20 +0000 (22:10 +1000)
committerPaul Mackerras <paulus@samba.org>
Thu, 9 Apr 2009 12:10:20 +0000 (22:10 +1000)
This adds a row context menu command to compare this commit and its
descendants with the marked commit and its descendants.  The results
are shown in the bottom-left pane.  Commits are compared by checking
whether their headlines are the same and their patches have the same
patch ID as generated by git patch-id.

Merges are ignored and skipped over (as long as they have one
descendant).  If two commits have the same patch ID then the process
will continue and compare their descendants, as long as they both have
exactly one descendant.  If either commit has 0 or 2 or more descendants,
the comparison stops there.  There is currently a limit of 100
comparisons.

This can be useful for checking whether one string of commits is just
a rebased version of another string of commits.  Mark the end of one
string (i.e. the oldest commit in the string) and invoke "Compare with
marked commit" on the end of the other string.

As this is implemented, the UI will be unresponsive while the results
are being generated.  This should be fixed.

Signed-off-by: Paul Mackerras <paulus@samba.org>

No differences found