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

Re: [BUG] "--show-current-patch" return a mail instead of a patch

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 23, 2019, 02:24 UTC
Message-ID
<xmqqzhhsi4g5.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<2154192.LVDMpRDY2h@pc-42>
Jerome Pouiller <Jerome.Pouiller@silabs.com> writes:
Show 6 quoted lines
> Hello all,
>
> I try to use "git am" to apply a patch sent using "git send-email". This
> patch does not apply properly. I try to use "git am --show-current-patch"
> to understand the problem. However, since original mail is encoded in quoted-
> printable, data returned by --show-current-patch is not a valid patch.

I agree that --show-current-patch is a misdesigned feature. We'd be doing a better service to our users if we documented that the patch and log message are found at .git/rebase-apply/{patch,msg} instead of trying to hide the path.

Unfortunately, it is likely that those who added that feature have built their tooling around it to depend on its output being the full e-mail message "am" was fed (and split by "git mailsplit"). So I do not think we will be changing the output to the patch file only.

But even then, the documentation can be fixed without any backward compatibility issues. Perhaps like this?

 Documentation/git-am.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt
index 6f6c34b0f4..f63b70325c 100644
--- a/Documentation/git-am.txt
+++ b/Documentation/git-am.txt
@@ -172,7 +172,7 @@ default.   You can use `--no-utf8` to override this.
 	untouched.
 
 --show-current-patch::
-	Show the patch being applied when "git am" is stopped because
+	Show the entire e-mail message "git am" has stopped at, because
 	of conflicts.
 
 DISCUSSION
Previous: Jerome PouillerNext: Jerome Pouiller
Message 2 of 7 in “[BUG] "--show-current-patch" return a mail instead of a patch”
  1. Jerome PouillerOct 22, 2019
  2. Junio C HamanoOct 23, 2019
  3. Jerome PouillerOct 23, 2019
  4. Denton LiuOct 23, 2019
  5. Jerome PouillerOct 23, 2019
  6. Denton LiuOct 23, 2019
  7. Jerome PouillerOct 23, 2019

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.