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

Re: [PATCH] mailsplit add option to include sanitized subject in filename

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 11, 2024, 21:25 UTC
Message-ID
<xmqqfrvrr3q7.fsf@gitster.g>
In-Reply-To
<5a25d75c-cc27-49d9-a49d-39f657fd17f4@intel.com>
Jacob Keller <jacob.e.keller@intel.com> writes:
Show 15 quoted lines
>> THe next level would be to still assume that you stop at the same
>> place (i.e. you do not support patches from multiple series in the
>> same mailbox), but use the number-santized-subject format.  This
>> would be a bit more involved, but I think all you need to update on
>> the "am" side is where the am_run() assigns the message file to the
>> local variable "mail".  You know the temporary directory where you
>> told "mailsplit" to create these individual messages, so you should
>> be able to "opendir/readdir/closedir" and create a list of numbered
>> files in the directory very early in "git am".  Knowing msgnum(state)
>> at that point in the loop, it should be trivial to change the code
>> that currently assumes the 4-th file is named "0004" to check for
>> the file whose name begins with "0004-".
>
> Yea, we pretty much just have to get the git-am process to work with the
> new names. I can look at using opendir/readdir here instead.

Not "here", but probably just after you called "mailsplit" and saw it return. After that nobody should be adding more split mail messages to the directory, so you do it once to grab all filenames.

Show 5 quoted lines
> Ya I don't care much about multiple series. I care more about making it
> handle scrambled series better than it does now. I download series off
> of lore.kernel.org (public-inbox based) and those seem to routinely have
> series out-of-order. I suspect this is because it bases them on arrival
> date and sometimes certain mailers get it out of order when sending.

Yeah, and that is why I said it would be a better use of the engineering resource to fix it at the source. Such a fix will benefit folks with existing versions of "git am", not needing to wait for your improved version.

Thanks.
Previous: Jacob KellerNext: Jacob Keller
Message 7 of 8 in “mailsplit add option to include sanitized subject in filename”
  1. mailsplit add option to include sanitized subject in filenameJacob Keller, Apr 9, 2024
  2. Junio C HamanoApr 9, 2024
  3. Jacob KellerApr 11, 2024
  4. Junio C HamanoApr 11, 2024
  5. Junio C HamanoApr 11, 2024
  6. Jacob KellerApr 11, 2024
  7. Junio C HamanoApr 11, 2024
  8. Jacob KellerApr 13, 2024

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.