git-quick-stats icon indicating copy to clipboard operation
git-quick-stats copied to clipboard

[Feature] Contribution Stats Sort By

Open xenoterracide opened this issue 5 years ago • 3 comments

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 avatar Dec 16 '20 20:12 xenoterracide

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.

xenoterracide avatar Dec 16 '20 20:12 xenoterracide

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 avatar Jun 12 '21 01:06 tomice

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?

tomice avatar Jun 12 '21 01:06 tomice