Re: [BUG] git-am silently applying patches incorrectly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



'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/]
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]