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

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

Open
djberg96 opened this issue Apr 6, 2022 · 4 comments
Open

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

djberg96 opened this issue Apr 6, 2022 · 4 comments

Comments

@djberg96
Copy link

djberg96 commented Apr 6, 2022

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.

@spacewander
Copy link
Collaborator

LGTM

@tfendin
Copy link
Contributor

tfendin commented Apr 9, 2022

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?

@djberg96
Copy link
Author

djberg96 commented Apr 9, 2022

@tfendin Works for me. :)

@dproteus13
Copy link

dproteus13 commented Oct 11, 2022 via email

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

No branches or pull requests

4 participants