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

Re: [PATCH 0.5/4] t4041 (diff-submodule-option): don't hardcode SHA-1 in expected outputs

From
Ramkumar Ramachandra <artagnon@gmail.com>
Date
Nov 27, 2012, 09:12 UTC
Message-ID
<CALkWK0=-zCJnsmoOSJWKnK7fGVwq+yFi47VKotH37GurgxzvCw@mail.gmail.com>
In-Reply-To
<CALkWK0=0SfOuKRZvgt=BOBsKTXtaO5Y7-wAWK4XftE_aY9idyA@mail.gmail.com>
Ugh, line wrapping breaks my patch.  I've attached a copy.
Ram
From 90bc75b78a6dd5e59d2055b05c065447bf051bb6 Mon Sep 17 00:00:00 2001
From: Ramkumar Ramachandra <artagnon@gmail.com>
Date: Mon, 26 Nov 2012 19:24:28 +0530
Subject: [PATCH] t4041 (diff-submodule-option): don't hardcode SHA-1 in
 expected outputs

The expected SHA-1 digests are always available in variables. Use them instead of hardcoding.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
---
 t/t4041-diff-submodule-option.sh | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/t/t4041-diff-submodule-option.sh b/t/t4041-diff-submodule-option.sh
index 57e8a9d..5377639 100755
--- a/t/t4041-diff-submodule-option.sh
+++ b/t/t4041-diff-submodule-option.sh
@@ -62,7 +62,7 @@ test_expect_success '--submodule=short overrides diff.submodule' "
 	cat >expected <<-EOF &&
 diff --git a/sm1 b/sm1
 new file mode 160000
-index 0000000..a2c4dab
+index 0000000..$head1
 --- /dev/null
 +++ b/sm1
 @@ -0,0 +1 @@
@@ -77,7 +77,7 @@ test_expect_success 'diff.submodule does not affect plumbing' '
 	cat >expected <<-EOF &&
 	diff --git a/sm1 b/sm1
 	new file mode 160000
-	index 0000000..a2c4dab
+	index 0000000..$head1
 	--- /dev/null
 	+++ b/sm1
 	@@ -0,0 +1 @@
@@ -173,10 +173,10 @@ mv sm1-bak sm1
 test_expect_success 'typechanged submodule(submodule->blob), --cached' "
 	git diff --submodule=log --cached >actual &&
 	cat >expected <<-EOF &&
-Submodule sm1 41fbea9...0000000 (submodule deleted)
+Submodule sm1 $head4...0000000 (submodule deleted)
 diff --git a/sm1 b/sm1
 new file mode 100644
-index 0000000..9da5fb8
+index 0000000..$head5
 --- /dev/null
 +++ b/sm1
 @@ -0,0 +1 @@
@@ -190,7 +190,7 @@ test_expect_success 'typechanged submodule(submodule->blob)' "
 	cat >expected <<-EOF &&
 diff --git a/sm1 b/sm1
 deleted file mode 100644
-index 9da5fb8..0000000
+index $head5..0000000
 --- a/sm1
 +++ /dev/null
 @@ -1 +0,0 @@
-- 
1.7.12.1.428.g652398a.dirty
Previous: Ramkumar Ramachandra
Message 2 of 2 in “t4041 (diff-submodule-option): don't hardcode SHA-1 in expected outputs”
  1. 5/4 t4041 (diff-submodule-option): don't hardcode SHA-1 in expected outputsRamkumar Ramachandra, Nov 27, 2012
  2. Ramkumar RamachandraNov 27, 2012

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.