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

Re: am: be more helpful

From
Sverre Rabbelier <srabbelier@gmail.com>
Date
Apr 9, 2010, 23:31 UTC
Message-ID
<j2yfabb9a1e1004091631v40226a94kbad5512e9439c65d@mail.gmail.com>
In-Reply-To
<7v4ojk1a1i.fsf@alter.siamese.dyndns.org>
Heya,
On Sat, Apr 10, 2010 at 01:27, Junio C Hamano <gitster@pobox.com> wrote:
Show 11 quoted lines
> Sverre Rabbelier <srabbelier@gmail.com> writes:
>> I run into this problem every now and then when I manually apply a
>> patch. I apply it, do some stuff, and then having forgotten I already
>> applied it, try to apply it again, and am confused as to why it won't
>> apply. Would it be difficult to teach 'git am' to see if the patch-id
>> of the patch that couldn't be applied has been applied already
>> (similar to what 'git cherry' does I guess?) and print a helpful
>> message saying "warning: patch already applied" when there is a
>> conflict trying to apply such an already-applied patch?
>
> "am -3"?

"Using index info to reconstruct a base tree... Falling back to patching base and 3-way merge... No changes -- Patch already applied."

Yeah, that's pretty much what I want, only I'd like to get that as a warning when running 'git am' without the -3. Either that, or have -3 be the default, which we all know won't happen :P. If I'd realize that perhaps I'd already applied the patch I could indeed use 'git am -3' to check that, or, as I do now (after a few minutes of confusion), scroll up and notice that I'd already applied it. What I want is to save me those minutes of confusion by having git DWIW.

-- 
Cheers,

Sverre Rabbelier
Previous: Junio C Hamano
Message 3 of 3 in “am: be more helpful”
  1. Sverre RabbelierApr 9, 2010
  2. Junio C HamanoApr 9, 2010
  3. Sverre RabbelierApr 9, 2010

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.