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

Added detailed stats for today grouped by user. #35

Closed
wants to merge 1 commit into from
Closed

Added detailed stats for today grouped by user. #35

wants to merge 1 commit into from

Conversation

vimist
Copy link

@vimist vimist commented Oct 16, 2017

Refactored the detailedGitStats function into two functions.

  • The detailedGitStats function has been renamed to
    _detailedGitStats.
  • The new _detailedGitStats function is almost identical to the
    old function, except it now doesn't output a title and it takes any
    number of arguments that get injected into the git log command (via
    the $@ variable). This increases its flexibility, so that it can be
    used in other places without duplicating code.
  • The detailedGitStats function now outputs a title and calls the
    _detailedGitStats function with the $_since and $_until
    variables as parameters (these are passed to the git log command as
    described above).

Added the detailedGitStatsTodayByAuthor function.

  • This function gets the stats for today grouped by author.
  • It uses the _detailedGitStats function to do this by passing in the
    --since flag that get passed to git log.

Added the detailedGitStatsTodayByAuthor to the interactive menu.

Added the detailedGitStatsTodayByAuthor to the non-interactive list of
options that can be given as a command line argument.

Added the detailedGitStatsTodayByAuthor to the list of possible
arguments.

Tested options 1 and 2 with this repository and output is behaving as
expected.

Tested options 1 and 2 with _GIT_SINCE and _GIT_UNTIL and output is
behaving as expected.

This should resolve #3.

Refactored the `detailedGitStats` function into two functions.
 - The `detailedGitStats` function has been renamed to
   `_detailedGitStats`.
 - The new `_detailedGitStats` function is almost identical to the
   old function, except it now doesn't output a title and it takes any
   number of arguments that get injected into the `git log` command (via
   the `$@` variable). This increases its flexibility, so that it can be
   used in other places without duplicating code.
 - The `detailedGitStats` function now outputs a title and calls the
   `_detailedGitStats` function with the `$_since` and `$_until`
   variables as parameters (these are passed to the `git log` command as
   described above).

Added the `detailedGitStatsTodayByAuthor` function.
 - This function gets the stats for today grouped by author.
 - It uses the `_detailedGitStats` function to do this by passing in the
   `--since` flag that get passed to `git log`.

Added the `detailedGitStatsTodayByAuthor` to the interactive menu.

Added the `detailedGitStatsTodayByAuthor` to the non-interactive list of
options that can be given as a command line argument.

Added the `detailedGitStatsTodayByAuthor` to the list of possible
arguments.

Tested options 1 and 2 with this repository and output is behaving as
expected.

Tested options 1 and 2 with `_GIT_SINCE` and `_GIT_UNTIL` and output is
behaving as expected.

This should resolve #3.
@arzzen
Copy link
Owner

arzzen commented Oct 18, 2017

Hi @vimist, Thanks for your contribution.

I think your changes are same as this use case scenario:
export _GIT_SINCE="midnight" then run git quick-stats and choose first option "Contribution stats (by author)"

@vimist
Copy link
Author

vimist commented Oct 19, 2017

Hi @arzzen,

You're right, they are. I had assumed (possibly wrongly) that this feature was wanted because of issue #3 and the labels assigned to it? Were you envisaging it being implemented in a different way?

@vimist
Copy link
Author

vimist commented Oct 26, 2017

@arzzen, any further thoughts on this?

@arzzen
Copy link
Owner

arzzen commented Nov 10, 2017

I think this "today stats" are too simple
Detailed stats for today should have had more info, like:

  • most changed files
  • different between yesterday and today (commits, files modified, line insertions, line deletions)
  • first today commit, last today commit
  • additional: most active user/s (except me)

@arzzen arzzen closed this Nov 10, 2017
@vimist vimist deleted the stats_for_today branch November 11, 2017 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Detailed stats for Today
2 participants