All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brandon Casey <drafnel@gmail.com>
To: git@vger.kernel.org
Cc: Brandon Casey <drafnel@gmail.com>, Brandon Casey <bcasey@nvidia.com>
Subject: [PATCH 1/5] t/test-lib-functions.sh: allow to specify the tag name to test_commit
Date: Wed, 14 Nov 2012 17:37:50 -0800	[thread overview]
Message-ID: <1352943474-15573-1-git-send-email-drafnel@gmail.com> (raw)

The <message> 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 <bcasey@nvidia.com>
---
 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..4d6057e 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 "<message> [<file> [<contents>]]"
+# Call test_commit with the arguments "<message> [<file> [<contents> [<tag>]]]"
 #
 # This will commit a file with the given contents and the given commit
-# message.  It will also add a tag with <message> as name.
+# message.  It will also add a tag with <message> as name unless <tag> is
+# given.
 #
-# Both <file> and <contents> default to <message>.
+# Both <file> <contents> and <tag> default to <message>.
 
 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 "<message> <commit>", where <commit>
-- 
1.8.0

             reply	other threads:[~2012-11-15  1:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-15  1:37 Brandon Casey [this message]
2012-11-15  1:37 ` [PATCH 2/5] t/t3511: demonstrate breakage in cherry-pick -s Brandon Casey
2012-11-16  1:58   ` Junio C Hamano
2012-11-16  2:40     ` Brandon Casey
2012-11-15  1:37 ` [PATCH 3/5] sequencer.c: handle rfc2822 continuation lines correctly Brandon Casey
2012-11-15  1:37 ` [PATCH 4/5] sequencer.c: recognize "(cherry picked from ..." as part of s-o-b footer Brandon Casey
2012-11-15 17:55   ` [PATCH v2 " Brandon Casey
2012-11-15  1:37 ` [PATCH/RFC 5/5] sequencer.c: always separate "(cherry picked from" from commit body Brandon Casey
2012-11-15 23:24   ` [PATCH 6/5] sequencer.c: refrain from adding duplicate s-o-b lines Brandon Casey
2012-11-16  2:03     ` Junio C Hamano
2012-11-16 23:55       ` Brandon Casey
2012-11-15  3:20 ` [PATCH 1/5] t/test-lib-functions.sh: allow to specify the tag name to test_commit Matt Kraai
2012-11-15  5:43   ` Brandon Casey
2012-11-15  5:49   ` [PATCH 1/5 v2] " Brandon Casey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1352943474-15573-1-git-send-email-drafnel@gmail.com \
    --to=drafnel@gmail.com \
    --cc=bcasey@nvidia.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.