git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Colin Guthrie <gmane@colin.guthr.ie>
To: Junio C Hamano <gitster@pobox.com>
Cc: Alexander Miseler <alexander@miseler.de>, git@vger.kernel.org
Subject: Re: [BUG] git-am silently applying patches incorrectly
Date: Mon, 07 Mar 2011 09:37:23 +0000	[thread overview]
Message-ID: <4D74A753.2020200@colin.guthr.ie> (raw)
In-Reply-To: <7vlj0r520k.fsf@alter.siamese.dyndns.org>

'Twas brillig, and Junio C Hamano at 06/03/11 22:15 did gyre and gimble:
>> > Personally I wouldn't bother making offset absolute... (equiv of
>> > abs(offset)) as knowing it applied earlier or later could be useful...
>> > the direction is lost here and I don't really see why that's nicer for
>> > the user. But maybe that's just my opinion?
> I don't have a strong opinion on this either way; I would just imitate
> what GNU patch would do, which would probably be to show the offset as-is,
> except that it flips the sign if it is being run in reverse with -R
> option.

Yeah I think that's quite sensible. I think converging with the way GNU
patch does it except when there is really good reason not to makes a lot
of sense, if nothing more than general familiarity and expectations.

> A bigger question I would actually care _more_ about is if this should be
> on by default without -v.  We usually do not allow fuzz by default for
> safety, and we do warn loudly when -C reduces the context and we actually
> need to use it to match the preimage.

Users used to using patch may simply think there are no offset
adjustments when using git am and live in blissful ignorance. For that
reason I'd say it should be on by default. But then again, I've been
recently jaded by a mis-applied patch... if I'm honest, I would probably
say that 99 times in a 100, I couldn't really care less (or really read)
the offset adjustments.... so I can't really comment very subjectively
here :s

> In any case, here is an update to match what GNU patch seems to do more
> closely.

Looks good to me!

Thanks again for looking into this issue :) Hopefully the primary fix
can be pushed soon and the nice usability improvements that have spawned
from it can head the same direction too :)

Col

-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mageia Contributor [http://www.mageia.org/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]

  reply	other threads:[~2011-03-07  9:37 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-04 13:40 [BUG] git-am silently applying patches incorrectly Colin Guthrie
2011-03-04 16:17 ` Drew Northup
2011-03-04 16:41   ` Colin Guthrie
2011-03-04 17:27     ` Junio C Hamano
2011-03-04 17:49 ` Junio C Hamano
2011-03-04 18:37   ` Junio C Hamano
2011-03-04 19:05     ` Junio C Hamano
2011-03-04 19:18       ` Linus Torvalds
2011-03-04 19:31         ` Junio C Hamano
2011-03-04 20:14           ` Alexander Miseler
2011-03-04 21:33             ` Junio C Hamano
2011-03-04 22:20               ` Colin Guthrie
2011-03-04 22:34                 ` Junio C Hamano
2011-03-04 22:42                 ` Junio C Hamano
2011-03-05 11:51                   ` Colin Guthrie
2011-03-06 22:15                     ` Junio C Hamano
2011-03-06 22:40                       ` Junio C Hamano
2011-03-06 22:56                         ` Jonathan Nieder
     [not found]                           ` <AANLkTikctSrfqKCdeYUyvUmAZjr=i7kaFhPeB-LfwgUz@mail.gmail.com>
2011-03-09 10:31                             ` [RFC/PATCH 0/2] i18n: add ngettext stub Jonathan Nieder
2011-03-09 10:46                               ` [PATCH 1/2] i18n: add stub ngettext implementation Jonathan Nieder
2011-03-09 10:52                               ` [PATCH 2/2] i18n: avoid conflict with ngettext from libintl Jonathan Nieder
2011-03-09 20:43                                 ` Junio C Hamano
2011-03-09 20:51                                   ` Jonathan Nieder
2011-03-09 20:55                                     ` Junio C Hamano
2011-03-10  3:17                                       ` [PATCH v2] i18n: add stub Q_() wrapper for ngettext Jonathan Nieder
2011-03-10  7:59                                         ` Junio C Hamano
2011-03-10  9:24                                           ` Ævar Arnfjörð Bjarmason
2011-03-10  9:21                                     ` [PATCH 2/2] i18n: avoid conflict with ngettext from libintl Ævar Arnfjörð Bjarmason
2011-03-06 22:15                     ` [BUG] git-am silently applying patches incorrectly Junio C Hamano
2011-03-07  9:37                       ` Colin Guthrie [this message]
2011-03-04 23:09               ` Alexander Miseler
2011-03-05  0:05                 ` Junio C Hamano
2011-03-04 22:58         ` Junio C Hamano
2011-03-04 21:49       ` Drew Northup

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

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

  git send-email \
    --in-reply-to=4D74A753.2020200@colin.guthr.ie \
    --to=gmane@colin.guthr.ie \
    --cc=alexander@miseler.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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.
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 NNTP newsgroup(s).