Re: [Attn - repository browser authors] diff-tree combined format.
- From
Junio C Hamano <junkio@cox.net>
- Date
- Feb 3, 2006, 19:55 UTC
- Message-ID
- <7vacd8fc94.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <e5bfff550602030417w290c12b6yc4406f890acadc73@mail.gmail.com>
Marco Costalba <mcostalba@gmail.com> writes:
Show 6 quoted lines
> This is just, as said above, a note to avoid someone else falls in the > same bug assuming > > @ -1,87 -1,3 +1,93 @ > > is the only possible header format.
When you parse normal unidiff, you may need to watch out for things like these:
--- a/H --- a/H --- a/H
+++ b/H +++ b/H +++ b/H
@@ -1 +1 @@ @@ -2,2 +1,0 @@ @@ -1 +0,0 @@
-A -2 -1
+1 -3 * When a hunk affects only one line, the line count is omitted.
* When a hunk is only removal of lines, the line count of the result is zero.
* When such a hunk removes lines from the beginning of the file, the line offset in the result is also zero.
I do not do the "omit 1" optimizatino in combined output format (yet -- should I???), so that would not be a problem. The other two you would see only when you do not have context, and combined output format has its own context length you cannot override, so they probably may not matter (I do not know offhand what 'diff-tree -c' would do in such cases).