[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: diff -u produces inconsistent header when comparing to a 1-line file
From: |
Andreas Schwab |
Subject: |
Re: diff -u produces inconsistent header when comparing to a 1-line file |
Date: |
Thu, 10 Feb 2005 13:49:16 +0100 |
User-agent: |
Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) |
Aaron Bentley <address@hidden> writes:
> Here's an example:
> $ echo hello | diff -u - /dev/null
> --- - 2005-02-09 12:08:11.000000000 -0500
> +++ /dev/null 2004-02-26 20:16:33.000000000 -0500
> @@ -1 +0,0 @@
> -hello
>
> The -1 is not a comma-separated pair, but for all other sizes it is a
> comma-separated pair. Note that 1,2 is used for a two-line file, and
> 1,3 is used for a three-liner, so 1,1 would be the expected value.
The number of lines defaults to 1 if omitted.
Andreas.
--
Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."