Re: [PATCH] Don't use $author_name undefined when $from contains no /\s</.

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

 



Junio C Hamano <junkio@xxxxxxx> wrote:
> Jim Meyering <jim@xxxxxxxxxxxx> writes:
>
>> I noticed a case not handled in a recent patch.
>
> Thanks. Will apply.
>
> Curiously your patch was whitespace damaged.

I wondered what you meant, so compared what I sent
with the output of the command I ran:

  git-format-patch --stdout --signoff HEAD~1

There were two differences, both involving removed trailing blanks.
The first was a part of the diff: a line consisting of a single space
denoting an empty line in the context.  I understood that those types
of lines may safely be truncated (removing the trailing blank),
and in fact, GNU diff -u (cvs) now does this by default:

2006-09-05  Paul Eggert  <eggert@xxxxxxxxxxx>

        * NEWS: diff -u no longer outputs trailing white space unless the
        input data has it.  Suggested by Jim Meyering.
        * doc/diff.texi (Detailed Unified): Document this.
        * src/context.c (pr_unidiff_hunk): Implement this.

The only other difference was the removal of the trailing blank following
the "--" signature introducer.

I see that git-apply does not handle this new format:

  $ git-apply patch
  fatal: corrupt patch at line 47

That diagnostic comes from builtin-apply.c:

		if (len <= 0)
			die("corrupt patch at line %d", linenr);

It would be nice if git would accept such unified diff output,
since no other program we know of rejects them.  Paul Eggert has
even submitted revised wording to make POSIX allow this style
of output.

For reference, the GNU diff thread started here:
  http://lists.gnu.org/archive/html/bug-gnu-utils/2006-09/msg00005.html
-
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]