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

[feature request] sort by other columns #36

Closed
travischambers opened this issue Apr 26, 2024 · 2 comments
Closed

[feature request] sort by other columns #36

travischambers opened this issue Apr 26, 2024 · 2 comments

Comments

@travischambers
Copy link

The default sort by commits is great, but i want to sort by net changes. 😁

@lukehsiao
Copy link
Owner

For some context, git shortlog can be sorted by either commits or author name. We're currently just using -n to get it by commits, git-stats isn't doing any sorting itself.

That said, I suspect this is pretty trivial to implement (just adding an option to sort by an enum, and run that sort on the vector before we print it).

Going to take a swing at an implementation soon.

@lukehsiao
Copy link
Owner

lukehsiao commented Apr 26, 2024

This in released in v0.1.14.

We also have the --reverse flag. So for example, if you wanted to sort by the net change in ascending order in a repository:

git-stats --sort net --reverse

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

No branches or pull requests

2 participants