git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v3 1/3] t6006: Use test-lib.sh definitions

From
Prarit Bhargava <prarit@redhat.com>
Date
Oct 24, 2019, 23:36 UTC
Message-ID
<20191024233617.18716-2-prarit@redhat.com>
In-Reply-To
<20191024233617.18716-1-prarit@redhat.com>
Use name and email definitions from test-lib.sh.
Signed-off-by: Prarit Bhargava <prarit@redhat.com>
---
 t/t6006-rev-list-format.sh | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/t/t6006-rev-list-format.sh b/t/t6006-rev-list-format.sh
index cfb74d0e0354..1f7d3f7acc9c 100755
--- a/t/t6006-rev-list-format.sh
+++ b/t/t6006-rev-list-format.sh
@@ -111,14 +111,14 @@ EOF
 # we don't test relative here
 test_format author %an%n%ae%n%ad%n%aD%n%at <<EOF
 commit $head2
-A U Thor
-author@example.com
+$GIT_AUTHOR_NAME
+$GIT_AUTHOR_EMAIL
 Thu Apr 7 15:13:13 2005 -0700
 Thu, 7 Apr 2005 15:13:13 -0700
 1112911993
 commit $head1
-A U Thor
-author@example.com
+$GIT_AUTHOR_NAME
+$GIT_AUTHOR_EMAIL
 Thu Apr 7 15:13:13 2005 -0700
 Thu, 7 Apr 2005 15:13:13 -0700
 1112911993
@@ -126,14 +126,14 @@ EOF
 
 test_format committer %cn%n%ce%n%cd%n%cD%n%ct <<EOF
 commit $head2
-C O Mitter
-committer@example.com
+$GIT_COMMITTER_NAME
+$GIT_COMMITTER_EMAIL
 Thu Apr 7 15:13:13 2005 -0700
 Thu, 7 Apr 2005 15:13:13 -0700
 1112911993
 commit $head1
-C O Mitter
-committer@example.com
+$GIT_COMMITTER_NAME
+$GIT_COMMITTER_EMAIL
 Thu Apr 7 15:13:13 2005 -0700
 Thu, 7 Apr 2005 15:13:13 -0700
 1112911993
@@ -410,7 +410,7 @@ test_expect_success 'empty email' '
 	test_tick &&
 	C=$(GIT_AUTHOR_EMAIL= git commit-tree HEAD^{tree} </dev/null) &&
 	A=$(git show --pretty=format:%an,%ae,%ad%n -s $C) &&
-	verbose test "$A" = "A U Thor,,Thu Apr 7 15:14:13 2005 -0700"
+	verbose test "$A" = "$GIT_AUTHOR_NAME,,Thu Apr 7 15:14:13 2005 -0700"
 '
 
 test_expect_success 'del LF before empty (1)' '
@@ -495,7 +495,7 @@ test_expect_success '%gd shortens ref name' '
 '
 
 test_expect_success 'reflog identity' '
-	echo "C O Mitter:committer@example.com" >expect &&
+	echo "$GIT_COMMITTER_NAME:$GIT_COMMITTER_EMAIL" >expect &&
 	git log -g -1 --format="%gn:%ge" >actual &&
 	test_cmp expect actual
 '
-- 
2.21.0
Previous: Junio C HamanoNext: Junio C Hamano
Message 6 of 7 in “Implement option to output local-part of email addresses”
  1. 0/3 Implement option to output local-part of email addressesPrarit Bhargava, Oct 24, 2019
  2. 3/3 pretty: add "%aL"|"%al|%cL|%cl" option to output local-part of email addressesPrarit Bhargava, Oct 24, 2019
  3. Junio C HamanoOct 25, 2019
  4. 2/3 t4203: Use test-lib.sh definitionsPrarit Bhargava, Oct 24, 2019
  5. Junio C HamanoOct 25, 2019
  6. 1/3 t6006: Use test-lib.sh definitionsPrarit Bhargava, Oct 24, 2019
  7. Junio C HamanoOct 25, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.