Commit graph

48 commits

Author SHA1 Message Date
Tom Ice 36405591ec Fix bug related to author name in hourly stats
* Fixing a bug where, if you insert an author's name that has a space in the
  "Git commits by author per hour" option, it fails due to improper variable
  expansion. Note that the current implementation is a "greedy" one in that
  it will attempt to look for any instance of the user provided string in the
  author field
2019-01-01 14:37:11 -05:00
Tom Ice 83e96f8b80 Fix divide by zero error and add utility checker
* In some situations, the awk statements in the functions commitsByMonth,
  commitsByDay, and commitsByHour attempt to divide by zero and display
  an error to the user. To invoke this bug, checkout any of the previous
  commits and attempt to see commits by hour from some user who has never
  committed to this repository.

  This commit fixes this bug by making sure the awk statement only ever
  executes when the total commits is greater than zero.

* Added a utility checker to make sure that the user has all of the necessary
  tools in their path in order to run this script. If they do not exist, it
  exits and informs the user that this script cannot locate them in PATH.

* Adjusted shell logic to prevent double negatives from confusing developers
  as ! -z is technically read as something akin to "not has no value"

* Changed some statements to utilize safer and more predictable bash-isms

* Minor white space fixes and adjusted the README.md slightly
2018-12-21 14:50:13 -05:00
Tom Ice 2274ca1284 Improve color compatibility and other minor fixes
* Color was originally done with ANSI escape characters for defining
  different "expected" colors. However, this is not uniform across all
  terminals. To improve what the designers of this program expect
  colors to be, escape codes were replaced with tput equivalents.
  For more information, see the GNU manual here:

  https://www.gnu.org/software/termutils/manual/termutils-2.0/html_chapter/tput_1.html

* Limited scope of variables to their local scope instead of having them
  be global

* Renamed menu variables to aid in readability and adjusted formatting
  slightly to be more uniform

* Fixed a bug where option_picked was assigning an array to a string
  and relying on the default behavior of the shell to interpret it

* Added the -r option to "read" for safety, as read without -r will
  interpret backslashes before spaces/line feeds, which tends to
  be an unintended side effect

* Updated all backtick notation to the newer POSIX $(..) notation for
  aid in readability when paired next to single quotes and improved
  safety

* Updated the README.md to include missing utilities and fixed some
  minor formatting issues
2018-12-21 12:05:53 -05:00
motiprajapati b767822eb3
Respect mailmap author email
While using this tool feature "Contribution stats (by author)", I observed that script was not respecting author email as option was being used here was "%ae". Corrected it to "%aE", output looks good now.
2018-11-30 13:26:17 +05:30
Daniel 374527dbe1 changelogs printed with days limit 2018-11-05 20:45:01 +02:00
Daniel dba2d87206 fixed git changelogs without author wont work 2018-11-05 20:40:13 +02:00
Phạm Ngọc Thắng e5727cf4e9
fix: author not show fullname 2018-09-19 10:17:16 +07:00
Alef Farah 36967bc6f4 Fix ambiguous argument when author is not specified 2018-07-25 18:38:37 -03:00
Robert Beilich a496390884 Fix error on whitespace in author name
Fixes https://github.com/arzzen/git-quick-stats/issues/37
2018-07-17 09:42:39 +02:00
Lukas Mestan 10353cbeff respecting .mailmap, refs #33 2017-09-04 11:23:16 +02:00
Lukáš Mešťan 0f68ba1588 fix define function 2017-07-28 09:42:33 +02:00
Lukas Mestan aa6065ed3b changelogsByAuthor 2017-03-28 10:36:56 +02:00
Lukas Mestan 66d7eee893 add author to changelogs 2017-03-28 10:15:19 +02:00
Lukas Mestan 5494388655
fix exit code 2017-03-18 14:04:03 +01:00
Lukas Mestan d2fe6fe5ce
bugfix tree view 2017-03-18 12:09:17 +01:00
Brian Kroth d4f09f23be adapts commitsByHour to allow reporting by author as well 2017-03-17 10:53:25 -05:00
Lukáš Mešťan 89a62ebe06 remove dot in pathspec 2017-03-17 07:30:29 +01:00
Lukáš Mešťan 481bc47482 rename variable _exclude to _pathspec 2017-03-16 11:43:48 +01:00
Lukas Mestan 29bbc98c87
rename _GIT_EXCLUDE to _GIT_PATHSPEC 2017-03-15 20:11:56 +01:00
Lukas Mestan f344f0dfb7
quote ${_exclude} 2017-03-15 19:09:07 +01:00
Lukas Mestan 8b24e28c95
add _GIT_EXCLUDE, #25 2017-03-15 18:51:00 +01:00
Lukas Mestan 745b995f30
update inline graph 2017-03-07 19:09:36 +01:00
Lukas Mestan 1a7abe3132
fix #24, sort commits by weekday 2017-02-28 20:15:17 +01:00
Lukas Mestan 11c1a9ff5c
add limit option for changelogs & branch tree view 2017-02-22 20:05:05 +01:00
Lukas Mestan 2e9b163766
remove white spaces 2017-02-21 20:36:08 +01:00
Dustin Blomquist 27f0857b77 added november to the list of months 2017-02-18 01:08:10 -06:00
Lukáš Mešťan 1f1b281b6f Update git-quick-stats 2017-02-12 11:01:57 +01:00
Lukas Mestan 64fc7150ad update graph stats 2017-02-06 08:57:05 +01:00
arzzen 0db92c4cc1 stats ascii graph 2017-02-05 21:03:14 +01:00
arzzen c6a294f390 added stats ber hour,day,month 2017-02-04 21:48:32 +01:00
Andrew Huss 057caf389d Exit if we are not in a git repo 2017-01-28 15:53:55 -08:00
arzzen ecdb11c6e9 fix pretty format in contribution stats #19 2017-01-25 21:41:04 +01:00
arzzen 7f099c0acb fix daily commits 2017-01-22 18:24:32 +01:00
arzzen 352ae7c505 add setting since/until 2017-01-22 18:16:07 +01:00
arzzen 84f4caf045 awk division by zero #16 2017-01-22 13:36:00 +01:00
arzzen fb3a113072 fix branch tree 2017-01-20 20:25:17 +01:00
Joopmicroop a9db346620 oops forgot discription 2017-01-19 21:59:46 +01:00
Joopmicroop 4e3457d70c added branchTree command and changed README.md 2017-01-19 21:35:00 +01:00
Nicholas Skinsacos 22659b8f21 Organize and simplify user interface
The current user interface seems to place options in no particular order, which slows down the user's workflow. By providing some more organization, the learning curve will be easier for new users. In order to test the changes, I've entered each option and verified the appropriate output and action.

* Provide a hierarchy of verbs for the corresponding set of options.
* Alphabetize menu options for a second layer of organization.
* Simplify option statements and change the corresponding output in the appropriate places.
* Reorder mapping of number to function in the main while loop.
2017-01-19 00:34:53 -05:00
arzzen bab896a6ec 🌵 remove %(color 2017-01-17 20:28:08 +01:00
arzzen 7b2768565a 🌵 2017-01-17 20:25:14 +01:00
arzzen a9380ec5a4 small changes 2017-01-17 20:23:33 +01:00
arzzen 7ded29df6b fix #7, #4 2017-01-17 19:07:41 +01:00
Melih Değiş 488cdfed30 Fix mixed indentation 2017-01-17 17:36:32 +03:00
Raimon Grau 7591ddb5d5 Add first -> last commits for each author. 2017-01-17 14:36:22 +01:00
Linell 02558e75a4 restrict to non-merge commits
Restrict the commits used in generating stats to commits that aren't
merges. For repos that have lots of pull requests that are merged in it
can really throw off the statistics.
2017-01-16 20:57:20 -06:00
arzzen 4df04839ea change to native menu 2017-01-16 21:03:40 +01:00
arzzen 3409eaf2b1 rename 2017-01-15 18:33:27 +01:00
Renamed from git-quick-stats.sh (Browse further)