mirror of
https://github.com/arzzen/git-quick-stats.git
synced 2026-09-09 23:26:18 -04:00
docs: clarify tag-based contributor option behavior
This commit is contained in:
parent
892040c3ad
commit
322470f415
|
|
@ -175,6 +175,14 @@ You can set variable `_GIT_LIMIT` for limited output. It will affect the "change
|
|||
export _GIT_LIMIT=20
|
||||
```
|
||||
|
||||
### Git tag
|
||||
|
||||
You can set `_GIT_TAG` to define the default tag used by the "new contributors since tag" option.
|
||||
|
||||
```bash
|
||||
export _GIT_TAG="foo"
|
||||
```
|
||||
|
||||
### Git log options
|
||||
|
||||
You can set `_GIT_LOG_OPTIONS` for [git log options](https://git-scm.com/docs/git-log#_options):
|
||||
|
|
|
|||
|
|
@ -119,6 +119,9 @@ if ! [[ "$_commit_days" =~ ^[0-9]+$ ]] || (( _commit_days <= 0 )); then
|
|||
_commit_days=30
|
||||
fi
|
||||
|
||||
# Specific git tag
|
||||
_tag="${_GIT_TAG:-}"
|
||||
|
||||
# Default menu theme
|
||||
# Set the legacy theme by typing "export _MENU_THEME=legacy"
|
||||
_theme="${_MENU_THEME:=default}"
|
||||
|
|
@ -1453,15 +1456,14 @@ if [[ "$#" -eq 1 ]]; then
|
|||
done
|
||||
newContributors "${newDate}";;
|
||||
-N|--new-contributors-since-tag)
|
||||
tag="${_GIT_TAG:-}"
|
||||
while [[ -z "${tag}" ]]; do
|
||||
read -r -p "Which tag? " tag
|
||||
if ! git rev-parse "${tag}" >/dev/null 2>&1; then
|
||||
echo "Error: Tag '${tag}' does not exist."
|
||||
tag=""
|
||||
while [[ -z "${_tag}" ]]; do
|
||||
read -r -p "Which tag? " _tag
|
||||
if ! git rev-parse "${_tag}" >/dev/null 2>&1; then
|
||||
echo "Error: Tag '${_tag}' does not exist."
|
||||
_tag=""
|
||||
fi
|
||||
done
|
||||
newContributorsSinceTag "${tag}";;
|
||||
newContributorsSinceTag "${_tag}";;
|
||||
-a|--commits-per-author) commitsPerAuthor;;
|
||||
-d|--commits-per-day) commitsPerDay;;
|
||||
-Y|--commits-by-year ) commitsByYear;;
|
||||
|
|
@ -1559,15 +1561,14 @@ if [[ "$#" -eq 0 ]]; then
|
|||
fi
|
||||
done
|
||||
newContributors "${newDate}"; showMenu;;
|
||||
12) tag=""
|
||||
while [[ -z "${tag}" ]]; do
|
||||
read -r -p "Which tag? " tag
|
||||
if ! git rev-parse "${tag}" >/dev/null 2>&1; then
|
||||
echo "Error: Tag '${tag}' does not exist."
|
||||
tag=""
|
||||
12) while [[ -z "${_tag}" ]]; do
|
||||
read -r -p "Which tag? " _tag
|
||||
if ! git rev-parse "${_tag}" >/dev/null 2>&1; then
|
||||
echo "Error: Tag '${_tag}' does not exist."
|
||||
_tag=""
|
||||
fi
|
||||
done
|
||||
newContributorsSinceTag "${tag}"; showMenu;;
|
||||
newContributorsSinceTag "${_tag}"; showMenu;;
|
||||
13) commitsPerAuthor; showMenu;;
|
||||
14) commitsPerDay; showMenu;;
|
||||
15) commitsByMonth; showMenu;;
|
||||
|
|
|
|||
|
|
@ -179,6 +179,10 @@ You can set _GIT_LIMIT for limited output log, example:
|
|||
.PP
|
||||
.B export _GIT_LIMIT=20
|
||||
.PP
|
||||
You can set _GIT_TAG to define the default tag used by the "new contributors since tag" option, example:
|
||||
.PP
|
||||
.B export _GIT_TAG="foo"
|
||||
.PP
|
||||
You can set _GIT_LOG_OPTIONS for git log options, example:
|
||||
.PP
|
||||
.B export _GIT_LOG_OPTIONS="--ignore-all-space --ignore-blank-lines"
|
||||
|
|
|
|||
Loading…
Reference in a new issue