]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'ah/format-patch-thread-doc'
authorJunio C Hamano <gitster@pobox.com>
Fri, 21 Apr 2023 22:35:04 +0000 (15:35 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 21 Apr 2023 22:35:05 +0000 (15:35 -0700)
Doc update.

* ah/format-patch-thread-doc:
  format-patch: correct documentation of --thread without an argument

1  2 
Documentation/git-format-patch.txt
t/t4014-format-patch.sh

index 508f3ae2c0e19b89e9259474c8d2422c6f0f5ad9,ed299e077d3f2be9136236ee815dd99b7ee91fc2..b1c13fb39a03dacf6180c4963d605f09d9b76c14
@@@ -99,7 -99,7 +99,7 @@@ To omit patch numbers from the subject
  
  If given `--thread`, `git-format-patch` will generate `In-Reply-To` and
  `References` headers to make the second and subsequent patch mails appear
 -as replies to the first mail; this also generates a `Message-Id` header to
 +as replies to the first mail; this also generates a `Message-ID` header to
  reference.
  
  OPTIONS
@@@ -163,7 -163,7 +163,7 @@@ include::diff-options.txt[
  --no-thread::
        Controls addition of `In-Reply-To` and `References` headers to
        make the second and subsequent mails appear as replies to the
 -      first.  Also controls generation of the `Message-Id` header to
 +      first.  Also controls generation of the `Message-ID` header to
        reference.
  +
  The optional <style> argument can be either `shallow` or `deep`.
@@@ -173,8 -173,7 +173,7 @@@ series, where the head is chosen from t
  threading makes every mail a reply to the previous one.
  +
  The default is `--no-thread`, unless the `format.thread` configuration
- is set.  If `--thread` is specified without a style, it defaults to the
- style specified by `format.thread` if any, or else `shallow`.
+ is set.  `--thread` without an argument is equivalent to `--thread=shallow`.
  +
  Beware that the default for 'git send-email' is to thread emails
  itself.  If you want `git format-patch` to take care of threading, you
diff --combined t/t4014-format-patch.sh
index 7f1d4e8d585f0008ba8d7383d3eb46c4994304e5,b27a72f78a81b7bc438d552f625de1204fe43214..3cf2b7a7fb70ec272d9f12294a26e2a1685c5999
@@@ -455,13 -455,13 +455,13 @@@ test_expect_success 'no threading' 
  
  cat >expect.thread <<EOF
  ---
 -Message-Id: <0>
 +Message-ID: <0>
  ---
 -Message-Id: <1>
 +Message-ID: <1>
  In-Reply-To: <0>
  References: <0>
  ---
 -Message-Id: <2>
 +Message-ID: <2>
  In-Reply-To: <0>
  References: <0>
  EOF
@@@ -470,17 -470,22 +470,22 @@@ test_expect_success 'thread' 
        check_threading expect.thread --thread main
  '
  
+ test_expect_success '--thread overrides format.thread=deep' '
+       test_config format.thread deep &&
+       check_threading expect.thread --thread main
+ '
  cat >expect.in-reply-to <<EOF
  ---
 -Message-Id: <0>
 +Message-ID: <0>
  In-Reply-To: <1>
  References: <1>
  ---
 -Message-Id: <2>
 +Message-ID: <2>
  In-Reply-To: <1>
  References: <1>
  ---
 -Message-Id: <3>
 +Message-ID: <3>
  In-Reply-To: <1>
  References: <1>
  EOF
@@@ -492,17 -497,17 +497,17 @@@ test_expect_success 'thread in-reply-to
  
  cat >expect.cover-letter <<EOF
  ---
 -Message-Id: <0>
 +Message-ID: <0>
  ---
 -Message-Id: <1>
 +Message-ID: <1>
  In-Reply-To: <0>
  References: <0>
  ---
 -Message-Id: <2>
 +Message-ID: <2>
  In-Reply-To: <0>
  References: <0>
  ---
 -Message-Id: <3>
 +Message-ID: <3>
  In-Reply-To: <0>
  References: <0>
  EOF
@@@ -513,21 -518,21 +518,21 @@@ test_expect_success 'thread cover-lette
  
  cat >expect.cl-irt <<EOF
  ---
 -Message-Id: <0>
 +Message-ID: <0>
  In-Reply-To: <1>
  References: <1>
  ---
 -Message-Id: <2>
 +Message-ID: <2>
  In-Reply-To: <0>
  References: <1>
        <0>
  ---
 -Message-Id: <3>
 +Message-ID: <3>
  In-Reply-To: <0>
  References: <1>
        <0>
  ---
 -Message-Id: <4>
 +Message-ID: <4>
  In-Reply-To: <0>
  References: <1>
        <0>
@@@ -545,13 -550,13 +550,13 @@@ test_expect_success 'thread explicit sh
  
  cat >expect.deep <<EOF
  ---
 -Message-Id: <0>
 +Message-ID: <0>
  ---
 -Message-Id: <1>
 +Message-ID: <1>
  In-Reply-To: <0>
  References: <0>
  ---
 -Message-Id: <2>
 +Message-ID: <2>
  In-Reply-To: <1>
  References: <0>
        <1>
@@@ -563,16 -568,16 +568,16 @@@ test_expect_success 'thread deep' 
  
  cat >expect.deep-irt <<EOF
  ---
 -Message-Id: <0>
 +Message-ID: <0>
  In-Reply-To: <1>
  References: <1>
  ---
 -Message-Id: <2>
 +Message-ID: <2>
  In-Reply-To: <0>
  References: <1>
        <0>
  ---
 -Message-Id: <3>
 +Message-ID: <3>
  In-Reply-To: <2>
  References: <1>
        <0>
@@@ -586,18 -591,18 +591,18 @@@ test_expect_success 'thread deep in-rep
  
  cat >expect.deep-cl <<EOF
  ---
 -Message-Id: <0>
 +Message-ID: <0>
  ---
 -Message-Id: <1>
 +Message-ID: <1>
  In-Reply-To: <0>
  References: <0>
  ---
 -Message-Id: <2>
 +Message-ID: <2>
  In-Reply-To: <1>
  References: <0>
        <1>
  ---
 -Message-Id: <3>
 +Message-ID: <3>
  In-Reply-To: <2>
  References: <0>
        <1>
@@@ -610,22 -615,22 +615,22 @@@ test_expect_success 'thread deep cover-
  
  cat >expect.deep-cl-irt <<EOF
  ---
 -Message-Id: <0>
 +Message-ID: <0>
  In-Reply-To: <1>
  References: <1>
  ---
 -Message-Id: <2>
 +Message-ID: <2>
  In-Reply-To: <0>
  References: <1>
        <0>
  ---
 -Message-Id: <3>
 +Message-ID: <3>
  In-Reply-To: <2>
  References: <1>
        <0>
        <2>
  ---
 -Message-Id: <4>
 +Message-ID: <4>
  In-Reply-To: <3>
  References: <1>
        <0>