summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorLibravatar Martin von Zweigbergk <martinvonz@gmail.com>2012-08-28 23:15:54 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-08-30 12:26:50 -0700
commitca92e59e30b503ff8861b6cd4d431d38738a7ee8 (patch)
treed253aef4dc21bb77348d3deef3e7982e58454221 /Documentation
parentGit 1.7.11 (diff)
downloadtgif-ca92e59e30b503ff8861b6cd4d431d38738a7ee8.tar.xz
teach log --no-walk=unsorted, which avoids sorting
When 'git log' is passed the --no-walk option, no revision walk takes place, naturally. Perhaps somewhat surprisingly, however, the provided revisions still get sorted by commit date. So e.g 'git log --no-walk HEAD HEAD~1' and 'git log --no-walk HEAD~1 HEAD' give the same result (unless the two revisions share the commit date, in which case they will retain the order given on the command line). As the commit that introduced --no-walk (8e64006 (Teach revision machinery about --no-walk, 2007-07-24)) points out, the sorting is intentional, to allow things like git log --abbrev-commit --pretty=oneline --decorate --all --no-walk to show all refs in order by commit date. But there are also other cases where the sorting is not wanted, such as <command producing revisions in order> | git log --oneline --no-walk --stdin To accomodate both cases, leave the decision of whether or not to sort up to the caller, by allowing --no-walk={sorted,unsorted}, defaulting to 'sorted' for backward-compatibility reasons. Signed-off-by: Martin von Zweigbergk <martinvonz@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/rev-list-options.txt11
1 files changed, 8 insertions, 3 deletions
diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt
index 1ae3c899ef..9780f4646a 100644
--- a/Documentation/rev-list-options.txt
+++ b/Documentation/rev-list-options.txt
@@ -619,9 +619,14 @@ These options are mostly targeted for packing of git repositories.
Only useful with '--objects'; print the object IDs that are not
in packs.
---no-walk::
-
- Only show the given revs, but do not traverse their ancestors.
+--no-walk[=(sorted|unsorted)]::
+
+ Only show the given commits, but do not traverse their ancestors.
+ This has no effect if a range is specified. If the argument
+ "unsorted" is given, the commits are show in the order they were
+ given on the command line. Otherwise (if "sorted" or no argument
+ was given), the commits are show in reverse chronological order
+ by commit time.
--do-walk::