2 ms·
The algorithm is much more sophisticated than that; it can match up commits that get reordered, and notice commits inserted in the middle of the series.
by JoshTriplett 8y ago
The algorithm is much more sophisticated than that; it can match up commits that get reordered, and notice commits inserted in the middle of the series.
- jordigh 8y agoHow effective is this? hg has added extra metadata on top with what we call "changeset evolution", which tracks this renaming information explicitly. git seems to like to track stuff like this implicitly, such as renaming files. How effectively can you track commit rewriting if you don't have explicit metadata to help you?
- JoshTriplett 8y agoQuite well, via well-established graph assignment algorithms that look for the best fits/matches between pairs of commits.
- u801e 8y agoI think you can some of that by copying the two git log -p outputs to separate files and then running vimdiff on both of them. At least in my experience, one can see commit re-ordering, commit addition, or commit removal. You could also get some of that by using the -y parameter to diff instead of -u. I'll definitely try it out and see how it compares to what we're doing now.