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

Already on GitHub? Sign in to your account

Branch manager should show unmerged commit count #378

Closed
DarwinAwardWinner opened this Issue Feb 16, 2012 · 4 comments

Comments

Projects
None yet
4 participants
Contributor

DarwinAwardWinner commented Feb 16, 2012

It would be nice if the branch manager showed a count of unmerged commits in each branch relative to the currently checked-out one (kind of like wazzup, but it doesn't need to actually list the commits). This would make it really easy to use the branch manager to clean up already-merged topic branches.

Member

dudebout commented Apr 3, 2012

What git command would you use to figure out that count?

Contributor

snogglethorpe commented Apr 3, 2012

Hmm...

git branch -r -v --no-merged  | while read name sha1 rest; do
    echo "$name: `git log --pretty=oneline $sha1.. | wc -l`"
done
Contributor

DarwinAwardWinner commented Apr 3, 2012

To get a list of commits in $BRANCH that are not merged into whatever is currently checked out, use

git log --pretty=oneline HEAD..$BRANCH

Pipe it through wc -l to get the count. You could even take the list of unmerged commits and make it expand when you press TAB on a branch in the branch manager.

But in fact, you could just copy however magit-wazzup does it.

Owner

tarsius commented May 26, 2013

Wazzup shows the number of commits relative to the tracked branch, the branch manager shows those not merged into the current branch. I think we should leave it at that.

@tarsius tarsius closed this May 26, 2013

@tarsius tarsius removed the . label May 29, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment