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

Re: [PATCH 0/2] Update git-send-email-script with --compose

From
Junio C Hamano <junkio@cox.net>
Date
Sep 5, 2005, 18:46 UTC
Message-ID
<7vll2b4ake.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20050905153705.GD5335@mythryan2.michonline.com>
Ryan Anderson <ryan@michonline.com> writes:
Show 16 quoted lines
> On Mon, Sep 05, 2005 at 11:16:57PM +1200, Martin Langhoff wrote:
>> 
>>  - reads "subject" from the first line of STDIN or file. If the line
>> doesn't start with [PATCH it provides the [PATCH] prefix. I found it
>> really confusing that it wants to get 'from' in the first line...
>> that's not what git-format-patch produces!
>
> Sorry about that - I always export using git-format-patch using --mbox,
> and those work nicely.  I'm a bit reluctant to do the [PATCH] fixup, but
> I think I will:
>
> 	1. Detect [PATCH] or [PATCH [0-9]+/[0-9]+] (Sorry for the horrid
> 	fake-regexp)
> 	2. Provide a --no-fixup-subject to turn that off.
>
> (TODO #2)

To be consistent with the other tools in tools/ directory, the above is probably 's/^/[PATCH] / unless (/^\[PATCH/])'

> In this case, remember that this was an attempt to help users patch bomb
> lists, getting all the subtle details correct.  The prompting is there
> to help get the subtle details correct!
You could error out without asking if that is what is happening.
> Well, I'm not.  Try "git format-patch --mbox -o patchdir origin" and see
> if that works better for you.

Martin, --mbox has the added benefit that it consistently preserves the From: and Date: information even for your own patches, because it implies --date and --author. By default without --author and --date these are not preserved from the original commits for your own patches, primarily because format-patch without --mbox was written for reorganizing and reordering existing patches (i.e. export, concatenate some, edit some hunks, and eventually feed it to applymbox to make commits; you do not typically want to keep the original author date for this kind of use).

> I do apologize for not realizing that the default git format-patch
> output doesn't match what git send-email script expects the "legacy"
> mode - I'll sort that out one way or another as well. (TODO #3)

I do apologize for not really saying what --mbox does and what the format-patch output without --mbox is meant for.

Martin, is there a reason you do not want --mbox format (e.g. format-patch --mbox spits out Subject: line undesirably formatted while it does what you want without --mbox)?

Previous: Ryan AndersonNext: Martin Langhoff
Message 6 of 10 in “Update git-send-email-script with --compose”
  1. 0/2 Update git-send-email-script with --composeRyan Anderson, Sep 5, 2005
  2. 1/2 Make git-send-email-script ignore some unnecessary options when operating in batch mode.Ryan Anderson, Sep 5, 2005
  3. 2/2 Update documentation of --compose to git-send-email-script.txtRyan Anderson, Sep 5, 2005
  4. Martin LanghoffSep 5, 2005
  5. Ryan AndersonSep 5, 2005
  6. Junio C HamanoSep 5, 2005
  7. Martin LanghoffSep 5, 2005
  8. Junio C HamanoSep 5, 2005
  9. Martin LanghoffSep 5, 2005
  10. Junio C HamanoSep 5, 2005

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.