1

Is there any way to reverse the order of the visual commit log view that displays in ?

I'm talking about visual representation that renders in in color as a tree view; i.e., the GUI version of what you get when you run something like this in the terminal:

git log --graph --online --abbrev-commit

I've looked in the menu under Edit Preferences and View New view..., but I couldn't find anything that pertained to the ordering of the commits.

I know I can display the commit log in reverse order in the terminal by adding the --reverse flag:

git log --reverse --oneline --abbrev-commit
# Displays list correctly

But it doesn't seem to play nicely with the --graph flag:

git log --reverse --oneline --abbrev-commit --graph
# fatal: cannot combine --reverse with --graph

Perhaps this is why doesn't give us the option to render the view in reverse.

At any rate, I'd like to know: is possible in to reverse the order of the commit log view?

Aaron Blenkush
  • 3,034
  • 2
  • 28
  • 54
  • I know this is not exactly what you wanted, but you can look into [`git-forest`](http://stackoverflow.com/a/15562953/380757), a script that will let you display the graph on the console, even when used with `--reverse` option. It parses the output from `git-log` and hence all options supported with `git-log` can be passed to this script as well. – Tuxdude Mar 22 '13 at 22:07
  • 1
    I don't know the answer to this question, but darn that is some fine markup +1 – Hogan Mar 23 '13 at 03:18

1 Answers1

3

gitk mostly accepts the same arguments as git rev-list (git: Is there a command line option for "Sort by date" for gitk?). However the --reverse argument, which would show the commits in descending order, is specifically excluded:

"--objects" - "--objects-edge" - "--reverse"
    # These cause our parsing of git log's output to fail, or else
    # they're options we want to set ourselves, so ignore them.

(Added in ee66e089c.)

Commenting it out and running with gitk --reverse seems to work, but I'm not sure if that would be accepted upstream as a patch.

Community
  • 1
  • 1
Joe
  • 29,416
  • 12
  • 68
  • 88