git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jacob Keller <jacob.keller@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Jacob Keller <jacob.e.keller@intel.com>, git@vger.kernel.org
Subject: Re: [PATCH] mailsplit add option to include sanitized subject in filename
Date: Fri, 12 Apr 2024 17:07:23 -0700	[thread overview]
Message-ID: <CA+P7+xqkTHrBy0adVC3Wmn6aqgGkdZyk7BdHPKsowBCyKWg11w@mail.gmail.com> (raw)
In-Reply-To: <xmqqfrvrr3q7.fsf@gitster.g>

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


      reply	other threads:[~2024-04-13  0:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-09  0:05 [PATCH] mailsplit add option to include sanitized subject in filename Jacob Keller
2024-04-09  1:55 ` Junio C Hamano
2024-04-11  3:22   ` Jacob Keller
2024-04-11  5:29     ` Junio C Hamano
2024-04-11  5:55     ` Junio C Hamano
2024-04-11 18:52       ` Jacob Keller
2024-04-11 21:25         ` Junio C Hamano
2024-04-13  0:07           ` Jacob Keller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+P7+xqkTHrBy0adVC3Wmn6aqgGkdZyk7BdHPKsowBCyKWg11w@mail.gmail.com \
    --to=jacob.keller@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jacob.e.keller@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).