git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: William Giokas <1007380@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [bug report] git-am applying maildir patches in reverse
Date: Fri, 01 Mar 2013 14:27:32 -0800	[thread overview]
Message-ID: <7vwqtqeox7.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <20130301222018.GA839@WST420> (William Giokas's message of "Fri, 1 Mar 2013 16:20:18 -0600")

William Giokas <1007380@gmail.com> writes:

> All,
>
> I've been using git for a while and this is the first time I've had to
> use `git am` and I've got a 16 patch patchset that I'm looking to apply.
> The files were copied to a separate maildir by mutt to keep things
> clean, and then I ran `git am -i /path/to/maildir/` expecting things to
> start from the patch with the subject 
>
>     [PATCH 01/16] refactor common code in query_search/sync_search
>
> But instead, it starts with the 16/16 patch and works backwards, which,
> obviously, breaks the application process as the patches depend on each
> other. I looked in the maildir directory just to see if the file names
> were backwards, and that's not the issue. I talked to `gitster` on IRC
> and he said to send in a bug report on this issue here. The patchset I'm
> trying to apply can be found here[0]. 
>
> Process to reproduce:
> * find a multi-patch set with interdependent patches
> * run `git am` on the maildir containing these patches
>
> Expected result:
> * Apply patches in [01..N] order
>
> Actual result:
> * Patches applied in [N N-1..01] order

Note to bystanders.  This is coming from populate_maildir_list() in
builtin/mailsplit.c; the function claims to know what "maildir"
should look like, so it should be enforcing the ordering as
necessary by sorting the list, _if_ the implicit ordering given by
string_list_insert() is insufficient.

It also is likely that it is a user error to expect that patch
e-mails are received and stored in the maildir in the order they
were sent, or it could be "mutt" copying the mails in the order the
messages were originally received, or something silly like that.

>
> [0]: https://mailman.archlinux.org/pipermail/pacman-dev/2013-March/016541.html
>
> Thank you,

  reply	other threads:[~2013-03-01 22:28 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-01 22:20 [bug report] git-am applying maildir patches in reverse William Giokas
2013-03-01 22:27 ` Junio C Hamano [this message]
2013-03-01 22:52   ` Jeff King
2013-03-01 23:05     ` Jeff King
2013-03-01 23:24       ` Junio C Hamano
2013-03-01 23:35         ` Jeff King
2013-03-01 23:57           ` Junio C Hamano
2013-03-02  0:38             ` Jeff King
2013-03-02  0:08           ` Junio C Hamano
2013-03-02  0:41             ` Jeff King
2013-03-02  8:44               ` Andreas Schwab
2013-03-03  6:22                 ` Junio C Hamano
2013-03-03  6:32                   ` Jeff King
2013-03-03  6:26                 ` Jeff King

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=7vwqtqeox7.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=1007380@gmail.com \
    --cc=git@vger.kernel.org \
    /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).