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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 11, 2024 at 2:25 PM Junio C Hamano <gitster@xxxxxxxxx> wrote:
>
> Jacob Keller <jacob.e.keller@xxxxxxxxx> writes:
>
> >> 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.
>
> > 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.

I went and talked to the public-inbox folks, and discovered that there
is a known problem and solution, with a utility called b4 intended for
downloading mbox files from the public-inbox

https://b4.docs.kernel.org/

Thought I'd mention that here if anyone else reading this thread was
curious about an ultimate solution.

b4 will find patches in the series, sort them, remove the replies and
can do some other common cleanup operations including things like
applying tags from other messages on the list.





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux