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

2014-05-08 Thread Junio C Hamano
Nathan Collins nathan.coll...@gmail.com 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* ---

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

2014-05-07 Thread Junio C Hamano
Nathan Collins nathan.coll...@gmail.com 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'

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 gits...@pobox.com wrote: Nathan Collins nathan.coll...@gmail.com 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

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 nathan.coll...@gmail.com wrote: On Wed, May 7, 2014 at 11:42 AM, Junio C Hamano gits...@pobox.com wrote: Nathan Collins nathan.coll...@gmail.com writes: For (2), the solution may be to add a separate 'diff.add-clickable-paths' option (probably

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 nathan.coll...@gmail.com wrote: On Wed, May 7, 2014 at 4:39 PM, Nathan Collins nathan.coll...@gmail.com wrote: On Wed, May 7, 2014 at 11:42 AM, Junio C Hamano gits...@pobox.com wrote: Nathan Collins nathan.coll...@gmail.com writes: For (2), the

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

2014-05-06 Thread Junio C Hamano
Nathan Collins nathan.coll...@gmail.com 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

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 gits...@pobox.com wrote: Nathan Collins nathan.coll...@gmail.com 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

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

2014-05-06 Thread Junio C Hamano
Nathan Collins nathan.coll...@gmail.com 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

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 gits...@pobox.com wrote: Nathan Collins nathan.coll...@gmail.com 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

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 jrnie...@gmail.com 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

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 jrnie...@gmail.com 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-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 locally