From 7d5087795eefaddf1d309d9573542d4aa14a615d Mon Sep 17 00:00:00 2001 From: Ben Cotton Date: Thu, 19 Sep 2024 14:28:41 -0400 Subject: [PATCH] Address more feedback * Add date examples to prompts * Update tests Signed-off-by: Ben Cotton --- git-quick-stats | 4 ++-- tests/commands_test.sh | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/git-quick-stats b/git-quick-stats index 9244623..ad96227 100755 --- a/git-quick-stats +++ b/git-quick-stats @@ -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="" diff --git a/tests/commands_test.sh b/tests/commands_test.sh index bd55765..bcb5a5e 100755 --- a/tests/commands_test.sh +++ b/tests/commands_test.sh @@ -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