Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort branches by last commit #101

Closed
zombiezen opened this issue Feb 13, 2019 · 3 comments
Closed

Sort branches by last commit #101

zombiezen opened this issue Feb 13, 2019 · 3 comments
Labels
enhancement New feature or request
Milestone

Comments

@zombiezen
Copy link
Member

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.

@zombiezen zombiezen added the enhancement New feature or request label Feb 13, 2019
@zombiezen zombiezen added this to the 0.8 milestone Feb 13, 2019
@zombiezen
Copy link
Member Author

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

@zombiezen
Copy link
Member Author

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.

@zombiezen zombiezen modified the milestones: 1.0, 1.1 Jun 18, 2020
@zombiezen
Copy link
Member Author

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

zombiezen added a commit that referenced this issue Oct 3, 2020
zombiezen added a commit that referenced this issue Dec 23, 2020
Version 1.1 is the second stable release of gg and includes new commands,
improved `gg branch` output, simpler GitHub integration, and a Homebrew formula.

 ### Added

-  New `addremove` command that adds new files and removes missing ones.
   ([#95](#95))
-  gg has a new command, `github-login`, which obtains a GitHub authorization
   token using a CLI-based OAuth flow. ([#122](#122))
-  `branch` has a new `--sort` flag to control the sort order.
-  gg can now be installed via [Homebrew][]! See https://gg-scm.io/install for
   instructions.

[Homebrew]: https://brew.sh/

 ### Changed

-  `branch` shows the commit hash, author, and summary for each branch.
-  `branch` now sorts by descending commit date by default.
   ([#101](#101))

 ### Fixed

-  `status` and `branch` now display color on Windows.
   ([#125](#125))
-  Released binaries are smaller: they no longer contain debug information.
   ([#121](#121))
-  `commit --amend` no longer exits with an error if the commit contains a
   rename. ([#129](#129))
-  `rebase` displays a simpler error message if the `-dst` argument doesn't
   exist. ([#127](#127))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

1 participant