From: Petr Baudis <pasky@suse.cz>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Jim Meyering <jim@meyering.net>, git@vger.kernel.org
Subject: Re: [PATCH] xdiff/xemit.c (xdl_find_func): Elide trailing white space in a context header.
Date: Mon, 23 Oct 2006 23:03:28 +0200 [thread overview]
Message-ID: <20061023210327.GT20017@pasky.or.cz> (raw)
In-Reply-To: <Pine.LNX.4.64.0610231347490.3962@g5.osdl.org>
Dear diary, on Mon, Oct 23, 2006 at 10:49:37PM CEST, I got a letter
where Linus Torvalds <torvalds@osdl.org> said that...
>
>
> On Mon, 23 Oct 2006, Jim Meyering wrote:
> >
> > This removes trailing blanks from git-generated diff headers
> > the same way a similar patch did that for GNU diff:
>
> NO!
>
> This is _wrong_
>
> You should only remove the space IF IT IS THE ONLY THING ON THE WHOLE
> LINE!
>
> You must not remove white-space in general.
>
> So the patch should check something like
>
> if (len == 1 && rec[0] == ' ')
> len = 0;
>
> and not like you did it.
>
> Otherwise the patch will simply not even _apply_.
Not really - mind you, this is only about the diff headers. Actually, it
is only about the hunk headers, specifically when we append the function
name to the hunk header. A trailing whitespace can come out of that even
if the source does not have any trailing whitespaces since we trim the
line at 40 bytes.
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)
next prev parent reply other threads:[~2006-10-23 21:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-23 20:22 [PATCH] xdiff/xemit.c (xdl_find_func): Elide trailing white space in a context header Jim Meyering
2006-10-23 20:49 ` Linus Torvalds
2006-10-23 21:03 ` Petr Baudis [this message]
2006-10-23 21:10 ` Linus Torvalds
2006-10-23 21:15 ` Jakub Narebski
2006-10-23 21:06 ` Jakub Narebski
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=20061023210327.GT20017@pasky.or.cz \
--to=pasky@suse.cz \
--cc=git@vger.kernel.org \
--cc=jim@meyering.net \
--cc=torvalds@osdl.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.