threads / discuss / 56005

[ANN] git-branch-list 0.1 released

Subject: [ANN] git-branch-list 0.1 released

## tl;dr

One message between Jun 25, 2021 and Jun 25, 2021.

replies: 0people: 1as markdown or json

Felipe Contreras· Jun 25, 2021, 16:21 UTC · lore

The current version of `git branch --list` mostly works, but it's slow and cumbersome. While this could easily be fixed in git itself, every patch that tries to improve the user interface is de facto rejected [1].

An external command `git branch-list` is the solution.
Why is `git branch-list` better?
 1. It provides useful information at all verbosity levels
 2. It does not clutter the output with unhelpful characters
 3. It provides a more consistent output
 4. It sorts branches by default
 5. It filters branches more conveniently
 6. It tracks branches in a simpler way
 7. It's way faster
== Verbosity levels ==
At level 0:
 * master origin/master
At level 1:
 * master [origin/master] The first batch post Git 2.32

What about the tracking information? That's orthogonal in `git branch-list`, and simplified:

 % git branch-list -t
 * master origin/master=
== Performance ==

Using 100 random branches on Linux with random commits over the past decade:

 % git branch --list --verbose
 21.611 seconds
 % git branch-list
 0.106 seconds
Grab it from my GitHub repository:
https://github.com/felipec/git-branch-list
Cheers.
[1] https://lore.kernel.org/git/YL8KiiGXF8LdGmQ2@coredump.intra.peff.net/
-- 
Felipe Contreras

← back to recent threads