aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-04-21 15:35:04 -0700
committerJunio C Hamano <gitster@pobox.com>2023-04-21 15:35:05 -0700
commit9e0d1aa495bd26f4688b915ac5c3cb656c9f7174 (patch)
treea2f26c9484a50995738eb6c7d8b4a60b953abbcf
parent7ac228c99451970bc1c31f32cbbd273311cd3a02 (diff)
parentf024913164ae6ec53bd97c0fb8481abb0fecd86d (diff)
downloadgit-9e0d1aa495bd26f4688b915ac5c3cb656c9f7174.tar.gz
Merge branch 'ah/format-patch-thread-doc'
Doc update. * ah/format-patch-thread-doc: format-patch: correct documentation of --thread without an argument
-rw-r--r--Documentation/git-format-patch.txt3
-rwxr-xr-xt/t4014-format-patch.sh5
2 files changed, 6 insertions, 2 deletions
diff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt
index 508f3ae2c0..b1c13fb39a 100644
--- a/Documentation/git-format-patch.txt
+++ b/Documentation/git-format-patch.txt
@@ -173,8 +173,7 @@ series, where the head is chosen from the cover letter, the
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 --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh
index 7f1d4e8d58..3cf2b7a7fb 100755
--- a/t/t4014-format-patch.sh
+++ b/t/t4014-format-patch.sh
@@ -470,6 +470,11 @@ 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>