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

Re: [PATCH] format-patch: autonumber by default

From
Jeff King <peff@peff.net>
Date
Oct 2, 2008, 21:06 UTC
Message-ID
<20081002210611.GA29480@coredump.intra.peff.net>
In-Reply-To
<1222978500-5780-1-git-send-email-giuseppe.bilotta@gmail.com>
On Thu, Oct 02, 2008 at 10:15:00PM +0200, Giuseppe Bilotta wrote:
>  Documentation/config.txt           |    5 +++--
>  Documentation/git-format-patch.txt |    9 ++++++---
>  builtin-log.c                      |    6 +++++-
>  3 files changed, 14 insertions(+), 6 deletions(-)

Thanks, the documentation updates look good to me. There are also some updates required in t4013 (since the expected outputs for some instances will now be numbered) and t4020 (which explicitly checks that the default is no numbering). Probably t4020 should be modified in light of the new default, like so:

---
 t/t4021-format-patch-numbered.sh |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/t/t4021-format-patch-numbered.sh b/t/t4021-format-patch-numbered.sh
index 43d64bb..390af23 100755
--- a/t/t4021-format-patch-numbered.sh
+++ b/t/t4021-format-patch-numbered.sh
@@ -45,17 +45,22 @@ test_numbered() {
 	grep "^Subject: \[PATCH 2/2\]" $1
 }
 
-test_expect_success 'Default: no numbered' '
+test_expect_success 'single patch defaults to no numbers' '
+	git format-patch --stdout HEAD~1 >patch0.single &&
+	test_single_no_numbered patch0.single
+'
+
+test_expect_success 'multiple patch defaults to numbered' '
 
-	git format-patch --stdout HEAD~2 >patch0 &&
-	test_no_numbered patch0
+	git format-patch --stdout HEAD~2 >patch0.multiple &&
+	test_numbered patch0.multiple
 
 '
 
 test_expect_success 'Use --numbered' '
 
-	git format-patch --numbered --stdout HEAD~2 >patch1 &&
-	test_numbered patch1
+	git format-patch --numbered --stdout HEAD~1 >patch1 &&
+	test_single_numbered patch1
 
 '
 
-- 
1.6.0.2.570.g2c958
Previous: Giuseppe BilottaNext: Brian Gernhardt
Message 11 of 21 in “format-patch: autonumber by default”
  1. format-patch: autonumber by defaultGiuseppe Bilotta, Oct 2, 2008
  2. Johannes SchindelinOct 2, 2008
  3. Giuseppe BilottaOct 2, 2008
  4. Johannes SchindelinOct 2, 2008
  5. format-patch: autonumber by defaultGiuseppe Bilotta, Oct 2, 2008
  6. Jakub NarebskiOct 2, 2008
  7. Andreas EricssonOct 2, 2008
  8. format-patch: autonumber by defaultGiuseppe Bilotta, Oct 2, 2008
  9. Jeff KingOct 2, 2008
  10. format-patch: autonumber by defaultGiuseppe Bilotta, Oct 2, 2008
  11. Jeff KingOct 2, 2008
  12. Brian GernhardtOct 2, 2008
  13. format-patch: autonumber by defaultBrian Gernhardt, Oct 2, 2008
  14. format-patch: autonumber by defaultBrian Gernhardt, Oct 2, 2008
  15. Brian GernhardtOct 2, 2008
  16. format-patch: autonumber by defaultBrian Gernhardt, Oct 2, 2008
  17. Eric W. BiedermanNov 4, 2009
  18. Junio C HamanoNov 4, 2009
  19. Brian GernhardtNov 4, 2009
  20. Andreas EricssonOct 2, 2008
  21. Johannes SixtOct 2, 2008

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.