gg-scm/gg

Sort branches by last commit

zombiezen opened this issue · 3 comments

Frequently, it's useful to show branches in order of how stale they are, not in alphabetical order. Perhaps this should be flag-guarded, but I'd definitely prefer this view of things.

(Could also reflog date, so sorting by last switched to.)

Tricky part about this one is efficiently grabbing the commit times. Using the rev^! notation mostly works, except in cases where other revisions are parents of other revisions in which case they interfere. A slow (linear) way of getting the same information would be to call *Git.CommitInfo per each hash.

Looks like I can use git log --no-walk=unsorted as a way of listing CommitInfo in bulk.