a3437b8c26
This patch linearises the GIT commit history graph into merge order
which is defined by invariants specified in Documentation/git-rev-list.txt.
The linearisation produced by this patch is superior in an objective sense
to that produced by the existing git-rev-list implementation in that
the linearisation produced is guaranteed to have the minimum number of
discontinuities, where a discontinuity is defined as an adjacent pair of
commits in the output list which are not related in a direct child-parent
relationship.
With this patch a graph like this:
a4 ---
| \ \
| b4 |
|/ | |
a3 | |
| | |
a2 | |
| | c3
| | |
| | c2
| b3 |
| | /|
| b2 |
| | c1
| | /
| b1
a1 |
| |
a0 |
| /
root
Sorts like this:
= a4
| c3
| c2
| c1
^ b4
| b3
| b2
| b1
^ a3
| a2
| a1
| a0
= root
Instead of this:
= a4
| c3
^ b4
| a3
^ c2
^ b3
^ a2
^ b2
^ c1
^ a1
^ b1
^ a0
= root
A test script, t/t6000-rev-list.sh, includes a test which demonstrates
that the linearisation produced by --merge-order has less discontinuities
than the linearisation produced by git-rev-list without the --merge-order
flag specified. To see this, do the following:
cd t
./t6000-rev-list.sh
cd trash
cat actual-default-order
cat actual-merge-order
The existing behaviour of git-rev-list is preserved, by default. To obtain
the modified behaviour, specify --merge-order or --merge-order --show-breaks
on the command line.
This version of the patch has been tested on the git repository and also on the linux-2.6
repository and has reasonable performance on both - ~50-100% slower than the original algorithm.
This version of the patch has incorporated a functional equivalent of the Linus' output limiting
algorithm into the merge-order algorithm itself. This operates per the notes associated
with Linus' commit
|
||
---|---|---|
.. | ||
diff-format.txt | ||
diffcore.txt | ||
git-apply-patch-script.txt | ||
git-cat-file.txt | ||
git-check-files.txt | ||
git-checkout-cache.txt | ||
git-commit-tree.txt | ||
git-convert-cache.txt | ||
git-diff-cache.txt | ||
git-diff-files.txt | ||
git-diff-helper.txt | ||
git-diff-tree.txt | ||
git-export.txt | ||
git-fsck-cache.txt | ||
git-http-pull.txt | ||
git-init-db.txt | ||
git-local-pull.txt | ||
git-ls-files.txt | ||
git-ls-tree.txt | ||
git-merge-base.txt | ||
git-merge-cache.txt | ||
git-merge-one-file-script.txt | ||
git-mkdelta.txt | ||
git-mktag.txt | ||
git-prune-script.txt | ||
git-pull-script.txt | ||
git-read-tree.txt | ||
git-resolve-script.txt | ||
git-rev-list.txt | ||
git-rev-tree.txt | ||
git-ssh-pull.txt | ||
git-ssh-push.txt | ||
git-tag-script.txt | ||
git-tar-tree.txt | ||
git-unpack-file.txt | ||
git-update-cache.txt | ||
git-write-blob.txt | ||
git-write-tree.txt | ||
git.txt | ||
Makefile | ||
tutorial.txt |