From: Brandon Casey Date: Mon, 26 Nov 2012 01:45:50 GMT Subject: [PATCH 02/11] t/test-lib-functions.sh: allow to specify the tag name to test_commit Message-ID: <1353894359-6733-3-git-send-email-drafnel@gmail.com> In-Reply-To: <1353894359-6733-1-git-send-email-drafnel@gmail.com> The part of test_commit() may not be appropriate for a tag name. So let's allow test_commit to accept a fourth argument to specify the tag name. Signed-off-by: Brandon Casey --- t/test-lib-functions.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh index 8889ba5..9e2b8b8 100644 --- a/t/test-lib-functions.sh +++ b/t/test-lib-functions.sh @@ -135,12 +135,13 @@ test_pause () { fi } -# Call test_commit with the arguments " [ []]" +# Call test_commit with the arguments " [ [ []]]" # # This will commit a file with the given contents and the given commit -# message. It will also add a tag with as name. +# message. It will also add a tag with as name unless is +# given. # -# Both and default to . +# , , and all default to . test_commit () { notick= && @@ -168,7 +169,7 @@ test_commit () { test_tick fi && git commit $signoff -m "$1" && - git tag "$1" + git tag "${4:-$1}" } # Call test_merge with the arguments " ", where -- 1.8.0.284.g959048a