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

Re: [PATCH v4 0/4] Introduce diff.submodule

From
Ramkumar Ramachandra <artagnon@gmail.com>
Date
Nov 16, 2012, 10:45 UTC
Message-ID
<CALkWK0k65oyz1FWdyjjHLjj-DS75cdfk_8Vd3NV4OwzS+--VaA@mail.gmail.com>
In-Reply-To
<20121115163356.GF6157@sigill.intra.peff.net>
Jeff King wrote:
> It may be worth squashing this test into patch 3:
Looks good.  Thanks.
Show 5 quoted lines
> BTW, while writing the test, I noticed two minor nits with your tests:
>
>   1. They can use test_config, which is simpler (you do not need to
>      unset yourself after the test) and safer (the unset happens via
>      test_when_finished, so it works even if the test fails).
I see.  Can you squash this in?
-- 8< --
diff --git a/t/t4041-diff-submodule-option.sh b/t/t4041-diff-submodule-option.sh
index e401814..876800f 100755
--- a/t/t4041-diff-submodule-option.sh
+++ b/t/t4041-diff-submodule-option.sh
@@ -56,7 +56,7 @@ EOF
 "

 test_expect_success '--submodule=short overrides diff.submodule' "
-	git config diff.submodule log &&
+	test_config diff.submodule log &&
 	git add sm1 &&
 	git diff --submodule=short --cached >actual &&
 	cat >expected <<-EOF &&
@@ -68,7 +68,6 @@ index 0000000..a2c4dab
 @@ -0,0 +1 @@
 +Subproject commit $fullhead1
 EOF
-	git config --unset diff.submodule &&
 	test_cmp expected actual
 "

>   2. You can still indent expected output when using <<-.

I know;  however, I wanted to be consistent with the surrounding code.

Ram
Previous: Jeff King
Message 12 of 12 in “Introduce diff.submodule”
  1. 0/4 Introduce diff.submoduleRamkumar Ramachandra, Nov 13, 2012
  2. 1/4 Documentation: move diff.wordRegex from config.txt to diff-config.txtRamkumar Ramachandra, Nov 13, 2012
  3. 2/4 diff: introduce diff.submodule configuration variableRamkumar Ramachandra, Nov 13, 2012
  4. Junio C HamanoNov 20, 2012
  5. Ramkumar RamachandraNov 22, 2012
  6. Ramkumar RamachandraNov 22, 2012
  7. 3/4 diff: rename "set" variableRamkumar Ramachandra, Nov 13, 2012
  8. 4/4 submodule: display summary header in boldRamkumar Ramachandra, Nov 13, 2012
  9. Jeff KingNov 15, 2012
  10. Jeff KingNov 15, 2012
  11. Jeff KingNov 15, 2012
  12. Ramkumar RamachandraNov 16, 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.