Re: git patches

2017-05-26 Thread Todd C. Miller
On Fri, 26 May 2017 06:55:34 -0400, "Ted Unangst" wrote: > what if we special case these special diffs? they are easily detectable, and > patch can fix them on the fly. of course, only do this when no -p option is > used to preserve patch's smarts about auto detecting directories. Seems reasonabl

Re: git patches

2017-05-26 Thread Jonathan Gray
On Fri, May 26, 2017 at 02:07:00PM +0100, Stuart Henderson wrote: > On 2017/05/26 14:26, Paul Irofti wrote: > > On Fri, May 26, 2017 at 06:55:34AM -0400, Ted Unangst wrote: > > > let's say, hypothetically, you're working with a blasphemer who mails you > > > a > > > git diff which looks a little l

Re: git patches

2017-05-26 Thread Stuart Henderson
On 2017/05/26 14:26, Paul Irofti wrote: > On Fri, May 26, 2017 at 06:55:34AM -0400, Ted Unangst wrote: > > let's say, hypothetically, you're working with a blasphemer who mails you a > > git diff which looks a little like this: > > > > diff --git a/d2/bar.c b/d2/bar.c > > index 496ef02..51a910f 10

Re: git patches

2017-05-26 Thread Stefan Sperling
On Fri, May 26, 2017 at 06:55:34AM -0400, Ted Unangst wrote: > what if we special case these special diffs? they are easily detectable, and > patch can fix them on the fly. of course, only do this when no -p option is > used to preserve patch's smarts about auto detecting directories. Fine with me

Re: git patches

2017-05-26 Thread Sebastian Benoit
Paul Irofti(p...@irofti.net) on 2017.05.26 14:26:46 +0300: > On Fri, May 26, 2017 at 06:55:34AM -0400, Ted Unangst wrote: > > let's say, hypothetically, you're working with a blasphemer who mails you a > > git diff which looks a little like this: > > > > diff --git a/d2/bar.c b/d2/bar.c > > index

Re: git patches

2017-05-26 Thread Marc Espie
On Fri, May 26, 2017 at 02:26:46PM +0300, Paul Irofti wrote: > On Fri, May 26, 2017 at 06:55:34AM -0400, Ted Unangst wrote: > > let's say, hypothetically, you're working with a blasphemer who mails you a > > git diff which looks a little like this: > > > > diff --git a/d2/bar.c b/d2/bar.c > > inde

Re: git patches

2017-05-26 Thread Paul Irofti
On Fri, May 26, 2017 at 06:55:34AM -0400, Ted Unangst wrote: > let's say, hypothetically, you're working with a blasphemer who mails you a > git diff which looks a little like this: > > diff --git a/d2/bar.c b/d2/bar.c > index 496ef02..51a910f 100644 > --- a/d2/bar.c > +++ b/d2/bar.c This is a st

git patches

2017-05-26 Thread Ted Unangst
let's say, hypothetically, you're working with a blasphemer who mails you a git diff which looks a little like this: diff --git a/d2/bar.c b/d2/bar.c index 496ef02..51a910f 100644 --- a/d2/bar.c +++ b/d2/bar.c the problem is obvious, no? there's these janky a/ and b/ marring the file names. if yo