git-extras icon indicating copy to clipboard operation
git-extras copied to clipboard

[RFE] Allow git count to accept a --recent argument

Open djberg96 opened this issue 2 years ago • 4 comments

I see there's a local-commits and count option, but nothing that gives me the number of commits versus the default branch.

This is what I use for that currently: git rev-list --count HEAD ^main

What I would like to be able to do is git count -r/--recent as a shortcut to achieve that.

If such a thing already exists and I've missed it, please let me know and close this.

djberg96 avatar Apr 06 '22 14:04 djberg96

LGTM

spacewander avatar Apr 07 '22 01:04 spacewander

Couldn't --recent be interpreted as what hasn't been pushed yet? I propose that we implement both --recent and --branch. --recent should then count commits between @ and @{upstream}, and --branch as @djberg96 suggests above. Or is it over kill?

tfendin avatar Apr 09 '22 14:04 tfendin

@tfendin Works for me. :)

djberg96 avatar Apr 09 '22 20:04 djberg96

The upstream branch should probably be configurable, especially to support git-flow workflows where the desired branch to compare to would likely be called develop or dev.

On Sat, Apr 9, 2022, 4:45 PM Daniel Berger @.***> wrote:

@tfendin https://github.com/tfendin Works for me. :)

— Reply to this email directly, view it on GitHub https://github.com/tj/git-extras/issues/960#issuecomment-1094121636, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAUADM6CXMRO25FPUXZR2CLVEHT47ANCNFSM5SWGQYFQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

dproteus13 avatar Oct 11 '22 08:10 dproteus13