Commit graph

35 commits

Author SHA1 Message Date
Tom Ice 2cc5cae1a8 Changed non-interactive args and fixed main loop
* The previous commands were Lower CamelCase style and had no equivalent
  short options. If you wanted to see the branch tree via non-interactive
  mode, you always needed to supply "branchTree" as the passing argument to
  the git-quick-stats script.

  This commit changes the argument style to be more akin to the POSIX and GNU
  styles of arguments commonly seen in many other applications. As of this
  commit, there is no compatibility with legacy commands, so those who have
  been using the old commands will unfortunately need to get familiar with the
  new ones. All documentation and tests have been updated accordingly to
  reflect the new changes.

* The main interactive loop contained a non-variable constant that was only
  getting parsed correctly due to legacy fallback behavior. This commit fixes
  the main loop and cleans up the formatting a little bit.

* Added -r to more areas where read reads in a variable to help prevent
  it from mangling backslashes.

* Changed everything to use bash's built-in [[ notation and did some minor
  formatting changes to reduce the LOC.

* Removed some unnecessary echo statements and did some other minor cleanup.
2019-01-10 20:47:40 -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
mixn 6f931ac9b5 Fixes minor typos 2018-09-27 13:56:19 +02:00
Lukáš Mešťan e81d3ab9f4
Update README.md 2018-01-22 20:15:45 +01:00
Lukáš Mešťan b0e62d64c7
Update README.md 2018-01-22 08:25:42 +01:00
Lukáš Mešťan db8009ff6d Update README.md 2017-09-29 13:41:25 +02:00
Lukáš Mešťan 6362149953 Update README.md 2017-09-29 13:33:00 +02:00
Lukáš Mešťan 90f6b631a9 update badges 2017-09-11 15:53:31 +02:00
Lukáš Mešťan 6a894d9efe Update README.md 2017-09-11 15:51:12 +02:00
Lukáš Mešťan a6aed25d4b citations 2017-06-07 10:28:08 +02:00
Lukáš Mešťan 9418613d42 fix #30
update readme
2017-05-08 12:15:08 +02:00
Lukas Mestan 3c3f261a7c
update readme 2017-04-02 17:31:31 +02:00
Lukas Mestan 5a55f87ad7
update readme 2017-02-22 20:11:26 +01:00
Lukáš Mešťan 06563a2170 🍺 homebrew installation 2017-02-21 21:09:47 +01:00
Lukas Mestan 8558eef324
update readme 2017-02-21 19:20:44 +00:00
Lukáš Mešťan 7b485e9a17 Update README.md 2017-02-04 22:01:44 +01:00
Lukáš Mešťan 3ecfa3f333 Update README.md 2017-02-04 21:58:57 +01:00
Lukáš Mešťan 2d7c71f7b1 Update README.md 2017-02-04 21:49:45 +01:00
Lukáš Mešťan adb698f93e Update README.md 2017-01-28 12:36:43 +01:00
Lukáš Mešťan f1785c71e4 Update README.md 2017-01-28 12:35:14 +01:00
Lukáš Mešťan f5599186cc Update README.md 2017-01-28 11:53:28 +01:00
Lukáš Mešťan 4d3ba3c0f1 Update README.md 2017-01-22 18:37:40 +01:00
Lukáš Mešťan 1b5b51595f Update README.md 2017-01-22 18:37:07 +01:00
Lukáš Mešťan 2ea7932763 cygwin installer/uninstaller 2017-01-22 14:41:27 +01:00
Joopmicroop 4e3457d70c added branchTree command and changed README.md 2017-01-19 21:35:00 +01:00
Lukáš Mešťan 23fb0be900 Update README.md 2017-01-19 19:26:59 +01:00
Lukáš Mešťan 114d90df22 Update README.md 2017-01-19 19:25:32 +01:00
Lukáš Mešťan c3f9d3492c Update README.md 2017-01-19 19:24:47 +01:00
Lukáš Mešťan e43317f6f5 Update README.md 2017-01-18 16:35:22 +01:00
Lukáš Mešťan 57b92859ee Update README.md 2017-01-17 07:26:44 +01:00
arzzen 97d31843fd update readme 2017-01-16 21:08:38 +01:00
Lukáš Mešťan ab9b042e35 Update README.md 2017-01-15 18:36:19 +01:00
arzzen c9f90c0346 init 2017-01-15 18:31:22 +01:00
Lukáš Mešťan 142205b47e Initial commit 2017-01-15 18:11:22 +01:00