Re: [BUG?] Patches created with 'diff.noprefix=true' don't 'git apply'.

2014-05-08 Thread Junio C Hamano
Nathan Collins writes: >> What would you propose to make clickable in a renaming diff, though? > > Your 'Index' header looks good, and I would expect a renaming diff to > have something like > > Index: foo -> bar > > as in 'git status', Heh, please don't call "Index:" *mine* --- It is a CVS ab

Re: [BUG?] Patches created with 'diff.noprefix=true' don't 'git apply'.

2014-05-07 Thread Nathan Collins
On Wed, May 7, 2014 at 9:38 PM, Nathan Collins wrote: > On Wed, May 7, 2014 at 4:39 PM, Nathan Collins > wrote: >> On Wed, May 7, 2014 at 11:42 AM, Junio C Hamano wrote: >>> Nathan Collins writes: >> For (2), the solution may be to add a separate 'diff.add-clickable-paths' option (pr

Re: [BUG?] Patches created with 'diff.noprefix=true' don't 'git apply'.

2014-05-07 Thread Nathan Collins
On Wed, May 7, 2014 at 4:39 PM, Nathan Collins wrote: > On Wed, May 7, 2014 at 11:42 AM, Junio C Hamano wrote: >> Nathan Collins writes: > >>> For (2), the solution may be to add a separate >>> 'diff.add-clickable-paths' option (probably there is a better name? >>> 'diff.add-copyable-paths'? ...

Re: [BUG?] Patches created with 'diff.noprefix=true' don't 'git apply'.

2014-05-07 Thread Nathan Collins
On Wed, May 7, 2014 at 11:42 AM, Junio C Hamano wrote: > Nathan Collins writes: >> For (2), the solution may be to add a separate >> 'diff.add-clickable-paths' option (probably there is a better name? >> 'diff.add-copyable-paths'? ...),... >> ... >> Concretely, if 'diff.add-clickable-paths' is s

Re: [BUG?] Patches created with 'diff.noprefix=true' don't 'git apply'.

2014-05-07 Thread Junio C Hamano
Nathan Collins writes: > More concretely, what I had in mind was that if 'diff.noprefix=true' > is set in the user's config, and the patch is in '-p0' format, then > Git could suggest to the user that the 'diff.noprefix' setting *might* > be causing them to generate '-p0' patches. If the user had

Re: [BUG?] Patches created with 'diff.noprefix=true' don't 'git apply'.

2014-05-06 Thread Nathan Collins
On Tue, May 6, 2014 at 2:12 PM, Junio C Hamano wrote: > Nathan Collins writes: > >> But 'git apply' could be much more helpful than 'patch' even, since >> the presence or absence of the 'a/' and 'b/' prefixes in the patch, >> and the 'diff.noprefix' setting, give Git enough info to be very >> hel

Re: [BUG?] Patches created with 'diff.noprefix=true' don't 'git apply'.

2014-05-06 Thread Junio C Hamano
Nathan Collins writes: > But 'git apply' could be much more helpful than 'patch' even, since > the presence or absence of the 'a/' and 'b/' prefixes in the patch, > and the 'diff.noprefix' setting, give Git enough info to be very > helpful to the user. The prefix would be unreliable as the gener

Re: [BUG?] Patches created with 'diff.noprefix=true' don't 'git apply'.

2014-05-06 Thread Nathan Collins
On Tue, May 6, 2014 at 11:10 AM, Junio C Hamano wrote: > Nathan Collins writes: > >> Hmmm. Maybe a warning that the patch is expected to be in '-p1' >> format, and that setting 'diff.noprefix=true' makes some commands >> generate '-p0' patches? > > "some"? Do you have exceptions in mind? As Jon

Re: [BUG?] Patches created with 'diff.noprefix=true' don't 'git apply'.

2014-05-06 Thread Junio C Hamano
Nathan Collins writes: > Hmmm. Maybe a warning that the patch is expected to be in '-p1' > format, and that setting 'diff.noprefix=true' makes some commands > generate '-p0' patches? "some"? Do you have exceptions in mind? > But I worry this would just confuse / distract > the people that don'

Re: [BUG?] Patches created with 'diff.noprefix=true' don't 'git apply'.

2014-05-05 Thread Jonathan Nieder
Nathan Collins wrote: > On Wed, Apr 30, 2014 at 7:40 PM, Jonathan Nieder wrote: >> Nathan Collins wrote: >>> git show | git apply --reverse >> >> The following which only uses plumbing commands should work: >> >> git diff-tree -p HEAD^! | >> git apply --reverse > > Nice! However,

Re: [BUG?] Patches created with 'diff.noprefix=true' don't 'git apply'.

2014-05-05 Thread Nathan Collins
On Wed, Apr 30, 2014 at 7:40 PM, Jonathan Nieder wrote: > Hi, > > Nathan Collins wrote: > >> Patches created with 'diff.noprefix=true' don't 'git apply' without >> specifying '-p0'. >> >> I'm not sure this is a bug -- the 'man git-apply' just says "Reads the >> supplied diff output (i.e. "a patch"

Re: [BUG?] Patches created with 'diff.noprefix=true' don't 'git apply'.

2014-04-30 Thread Jonathan Nieder
Hi, Nathan Collins wrote: > Patches created with 'diff.noprefix=true' don't 'git apply' without > specifying '-p0'. > > I'm not sure this is a bug -- the 'man git-apply' just says "Reads the > supplied diff output (i.e. "a patch") and applies it to files" -- but > I would expect patches I create

[BUG?] Patches created with 'diff.noprefix=true' don't 'git apply'.

2014-04-30 Thread Nathan Collins
Bug? Patches created with 'diff.noprefix=true' don't 'git apply' without specifying '-p0'. I'm not sure this is a bug -- the 'man git-apply' just says "Reads the supplied diff output (i.e. "a patch") and applies it to files