Address more feedback

* Add date examples to prompts
* Update tests

Signed-off-by: Ben Cotton <bcotton@funnelfiasco.com>
This commit is contained in:
Ben Cotton
2024-09-19 14:28:41 -04:00
parent fe2df31c36
commit 7d5087795e
2 changed files with 4 additions and 2 deletions

View File

@@ -1030,7 +1030,7 @@ if [[ "$#" -eq 1 ]]; then
-n|--new-contributors)
newDate=""
while [[ -z "${newDate}" ]]; do
read -r -p "Since what date? " newDate
read -r -p "Since what date? (e.g. '2023-04-13', '13 April 2023', 'last Thursday') " newDate
# Test if the date provide is valid and try again if it isn't.
# date(1) is pretty accepting of time stamps but you never know
# what people may try. This script doesn't provide any additional
@@ -1122,7 +1122,7 @@ while [[ "${opt}" != "" ]]; do
10) contributors; showMenu;;
11) newDate=""
while [[ -z "${newDate}" ]]; do
read -r -p "Since what date? " newDate
read -r -p "Since what date? (e.g. '2023-04-13', '13 April 2023', 'last Thursday') " newDate
# Test if the date provide is valid and try again if it isn't.
if ! date -d "${newDate}" +%s > /dev/null 2>&1; then
newDate=""

View File

@@ -50,6 +50,8 @@ LIST OPTIONS
show branches by date
-C, --contributors
see a list of everyone who contributed to the repo
-n, --new-contributors
list everyone who made their first contribution since a specified date
-a, --commits-per-author
displays a list of commits per author
-d, --commits-per-day