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] Contribution Stats Sort By #119

Open
xenoterracide opened this issue Dec 16, 2020 · 3 comments
Open

[Feature] Contribution Stats Sort By #119

xenoterracide opened this issue Dec 16, 2020 · 3 comments

Comments

@xenoterracide
Copy link

Is your feature request related to a problem? Please describe.

we have quite a few committers on a 200k line project that's been developed for 10 years. I'd like to be able to sort by lines changed

Describe the solution you'd like

--sort-by "lines changed

Describe alternatives you've considered

using another script on the internet.

@xenoterracide
Copy link
Author

xenoterracide commented Dec 16, 2020

unrelated questions

  1. does this filter the revision properly? this is a reformat everything commit, so I'd like to ignore it for stats
 _GIT_LOG_OPTIONS="--ignore-all-space --ignore-blank-lines --exclude 17604c87aaf4b31c548fbb7c493aa2ebf3fae178" git quick-stats
  1. this doesn't seem to mimic the UI of contribution stats by branch, how do you do that?
> _GIT_LOG_OPTIONS="--ignore-all-space --ignore-blank-lines --exclude 17604c87aaf4b31c548fbb7c493aa2ebf3fae178" git quick-stats -R master                                         # dex -> vaadin14 $ ! ?

maybe add these to the docs? neither did -T both gave me Invalid arguments and help output, and that output didn't actually help me fix my command.

@tomice
Copy link
Collaborator

tomice commented Jun 12, 2021

Sorry for the late response. I'll try to address your reply to this ticket. If you would like to omit a specific commit, you can use the --skip option i.e. git log --skip 17604c87aaf4b31c548fbb7c493aa2ebf3fae178.

Passing branch names via the non-interactive command still requires an interactive input. In this case, the user will need to specify what branch. This is true for authors as well. This means that --git-stats-by-branch, --changelogs-by-author, --json-output, --commits-by-author-by-hour, and so forth will require a temporary interaction with the shell. In your examples, you are passing an extra argument to the script that it is not expecting to handle, so what happens will be undefined behavior.

I don't exactly understand the second part of your question where you say your options do not mimic the UI. Could you possibly show some shell output to explain what you are running into and what you are seeing that is amiss? Have any suggestions on what to add to the help documentation that could assist those who are facing problems like you are currently facing?

@tomice
Copy link
Collaborator

tomice commented Jun 12, 2021

And regarding the feature request - could you possibly describe how you envision it working? Are you looking for a list of users sorted by order of the number of lines they changed as reported by git log? So in essence, it would be similar to how we suggest reviewers currently with --suggest-reviewers but based on lines changed? Is this correct?

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

3 participants