{"thread":{"id":"23402","subject":"am: be more helpful","startedAt":"2010-04-09T22:59:11Z","lastAt":"2010-04-09T23:31:42Z","messageCount":3,"participants":["Sverre Rabbelier","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"139085","messageId":"t2kfabb9a1e1004091559u92230e17h957f2c5565c133e3@mail.gmail.com","threadId":"23402","inReplyTo":null,"subject":"am: be more helpful","fromName":"Sverre Rabbelier","fromEmail":"srabbelier@gmail.com","sentAt":"2010-04-09T22:59:11Z","receivedAt":"2010-04-09T22:59:11Z","isPatch":false,"sender":{"key":"srabbelier@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3098?v=4"},"body":"Heya,\n\nI run into this problem every now and then when I manually apply a\npatch. I apply it, do some stuff, and then having forgotten I already\napplied it, try to apply it again, and am confused as to why it won't\napply. Would it be difficult to teach 'git am' to see if the patch-id\nof the patch that couldn't be applied has been applied already\n(similar to what 'git cherry' does I guess?) and print a helpful\nmessage saying \"warning: patch already applied\" when there is a\nconflict trying to apply such an already-applied patch?\n\n-- \nCheers,\n\nSverre Rabbelier\n"},{"id":"139090","messageId":"7v4ojk1a1i.fsf@alter.siamese.dyndns.org","threadId":"23402","inReplyTo":"t2kfabb9a1e1004091559u92230e17h957f2c5565c133e3@mail.gmail.com","subject":"Re: am: be more helpful","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-04-09T23:27:37Z","receivedAt":"2010-04-09T23:27:37Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Sverre Rabbelier <srabbelier@gmail.com> writes:\n\n> Heya,\n>\n> I run into this problem every now and then when I manually apply a\n> patch. I apply it, do some stuff, and then having forgotten I already\n> applied it, try to apply it again, and am confused as to why it won't\n> apply. Would it be difficult to teach 'git am' to see if the patch-id\n> of the patch that couldn't be applied has been applied already\n> (similar to what 'git cherry' does I guess?) and print a helpful\n> message saying \"warning: patch already applied\" when there is a\n> conflict trying to apply such an already-applied patch?\n\n\"am -3\"?\n"},{"id":"139091","messageId":"j2yfabb9a1e1004091631v40226a94kbad5512e9439c65d@mail.gmail.com","threadId":"23402","inReplyTo":"7v4ojk1a1i.fsf@alter.siamese.dyndns.org","subject":"Re: am: be more helpful","fromName":"Sverre Rabbelier","fromEmail":"srabbelier@gmail.com","sentAt":"2010-04-09T23:31:42Z","receivedAt":"2010-04-09T23:31:42Z","isPatch":false,"sender":{"key":"srabbelier@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3098?v=4"},"body":"Heya,\n\nOn Sat, Apr 10, 2010 at 01:27, Junio C Hamano <gitster@pobox.com> wrote:\n> Sverre Rabbelier <srabbelier@gmail.com> writes:\n>> I run into this problem every now and then when I manually apply a\n>> patch. I apply it, do some stuff, and then having forgotten I already\n>> applied it, try to apply it again, and am confused as to why it won't\n>> apply. Would it be difficult to teach 'git am' to see if the patch-id\n>> of the patch that couldn't be applied has been applied already\n>> (similar to what 'git cherry' does I guess?) and print a helpful\n>> message saying \"warning: patch already applied\" when there is a\n>> conflict trying to apply such an already-applied patch?\n>\n> \"am -3\"?\n\n\"Using index info to reconstruct a base tree...\nFalling back to patching base and 3-way merge...\nNo changes -- Patch already applied.\"\n\nYeah, that's pretty much what I want, only I'd like to get that as a\nwarning when running 'git am' without the -3. Either that, or have -3\nbe the default, which we all know won't happen :P. If I'd realize that\nperhaps I'd already applied the patch I could indeed use 'git am -3'\nto check that, or, as I do now (after a few minutes of confusion),\nscroll up and notice that I'd already applied it. What I want is to\nsave me those minutes of confusion by having git DWIW.\n\n-- \nCheers,\n\nSverre Rabbelier\n"}]}