git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Johannes Sixt <j6t@kdbg.org>
To: Drew DeVault <sir@cmpwn.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] am: add --check option
Date: Tue, 4 Jun 2019 07:58:51 +0200	[thread overview]
Message-ID: <c1dec466-55ca-8543-8f4e-b5daf1e0eab6@kdbg.org> (raw)
In-Reply-To: <BUKFSM2OTJUH.38N6DGWH9KX7H@homura>

Am 04.06.19 um 00:00 schrieb Drew DeVault:
> On Mon Jun 3, 2019 at 11:09 PM Johannes Sixt wrote:
>> I have to wonder how --check works when 'am' applies multiple patches.
>>
>> When the second patch in a patch series depends on that the first patch
>> is fully applied, what does --check do? Without the first patch applied,
>> then a naive check of the second patch will certainly fail, doesn't it?
> 
> Yeah, this was being discussed in another thread. It'll fail if the
> second patch relies on changes from the first. Open to suggestions on
> how to improve that, but I think it can be improved in a later patch.
> One solution would be to apply all of the patches and then roll back the
> head, but that would dirty the reflog and wouldn't work on a read-only
> filesystem (which it ought to, imo). We can't just say bugger this for a
> lark and ask people to use git-apply, because git-apply chokes on the
> typical email which isn't in the one specific format git-apply wants to
> see (git-am massages emails into that format before sending them to
> git-apply).
> 

You can 'git apply --cached' the patches on a temporary index. This
works as long as no merge is necessary, because that would require a
worktree.

-- Hannes

       reply	other threads:[~2019-06-04  5:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <BUKFSM2OTJUH.38N6DGWH9KX7H@homura>
2019-06-04  5:58 ` Johannes Sixt [this message]
2019-06-04 13:40   ` [PATCH] am: add --check option Johannes Schindelin
2019-06-04 14:06   ` Christian Couder
2019-06-03 14:25 Drew DeVault
2019-06-03 15:46 ` SZEDER Gábor
2019-06-03 21:09 ` Johannes Sixt
2019-06-04 15:37 ` René Scharfe

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=c1dec466-55ca-8543-8f4e-b5daf1e0eab6@kdbg.org \
    --to=j6t@kdbg.org \
    --cc=git@vger.kernel.org \
    --cc=sir@cmpwn.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).