git-extras
git-extras copied to clipboard
[RFE] Allow git count to accept a --recent argument
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.
LGTM
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 Works for me. :)
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: @.***>