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

[PATCH 03/10] t1300: abstract away SHA-1-specific constants

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Mar 25, 2018, 19:20 UTC
Message-ID
<20180325192055.841459-4-sandals@crustytoothpaste.net>
In-Reply-To
<20180325192055.841459-1-sandals@crustytoothpaste.net>

Adjust the test so that it uses the computed blob value instead of hard-coding a hash.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
---
 t/t1300-repo-config.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh
index 4f8e6f5fde..dc7e6c2e77 100755
--- a/t/t1300-repo-config.sh
+++ b/t/t1300-repo-config.sh
@@ -1587,10 +1587,10 @@ test_expect_success '--show-origin stdin with file include' '
 '
 
 test_expect_success !MINGW '--show-origin blob' '
-	cat >expect <<-\EOF &&
-		blob:a9d9f9e555b5c6f07cbe09d3f06fe3df11e09c08	user.custom=true
-	EOF
 	blob=$(git hash-object -w "$CUSTOM_CONFIG_FILE") &&
+	cat >expect <<-EOF &&
+		blob:$blob	user.custom=true
+	EOF
 	git config --blob=$blob --show-origin --list >output &&
 	test_cmp expect output
 '
Previous: brian m. carlsonNext: brian m. carlson
Message 4 of 20 in “Hash-independent tests (part 1)”
  1. 00/10 Hash-independent tests (part 1)brian m. carlson, Mar 25, 2018
  2. 01/10 t1011: abstract away SHA-1-specific constantsbrian m. carlson, Mar 25, 2018
  3. 02/10 t1304: abstract away SHA-1-specific constantsbrian m. carlson, Mar 25, 2018
  4. 03/10 t1300: abstract away SHA-1-specific constantsbrian m. carlson, Mar 25, 2018
  5. 05/10 t1411: abstract away SHA-1-specific constantsbrian m. carlson, Mar 25, 2018
  6. 04/10 t1405: sort reflog entries in a hash-independent waybrian m. carlson, Mar 25, 2018
  7. Junio C HamanoMar 26, 2018
  8. brian m. carlsonMar 26, 2018
  9. 07/10 t2020: abstract away SHA-1 specific constantsbrian m. carlson, Mar 25, 2018
  10. 06/10 t1507: abstract away SHA-1-specific constantsbrian m. carlson, Mar 25, 2018
  11. 08/10 t2101: modernize test stylebrian m. carlson, Mar 25, 2018
  12. 09/10 t2101: abstract away SHA-1-specific constantsbrian m. carlson, Mar 25, 2018
  13. 10/10 t2107: abstract away SHA-1-specific constantsbrian m. carlson, Mar 25, 2018
  14. Eric SunshineMar 26, 2018
  15. Junio C HamanoMar 26, 2018
  16. Johannes SchindelinMar 27, 2018
  17. Junio C HamanoMar 28, 2018
  18. Johannes SchindelinMar 29, 2018
  19. brian m. carlsonMar 26, 2018
  20. Johannes SchindelinMar 27, 2018

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.