Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Commits on Aug 30, 2012
  1. @martinvonz @gitster

    teach log --no-walk=unsorted, which avoids sorting

    martinvonz committed with gitster
    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
     <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 <>
    Signed-off-by: Junio C Hamano <>
Something went wrong with that request. Please try again.