public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox•net>
To: Marco Costalba <mcostalba@gmail•com>
Cc: Paul Mackerras <paulus@samba•org>,
	Marco Costalba <mcostalba@yahoo•it>,
	Aneesh Kumar <aneesh.kumar@gmail•com>,
	Kay Sievers <kay.sievers@suse•de>,
	git@vger•kernel.org
Subject: Re: [Attn - repository browser authors] diff-tree combined format.
Date: Fri, 03 Feb 2006 11:55:35 -0800	[thread overview]
Message-ID: <7vacd8fc94.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: e5bfff550602030417w290c12b6yc4406f890acadc73@mail.gmail.com

Marco Costalba <mcostalba@gmail•com> writes:

> 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).

  reply	other threads:[~2006-02-03 19:55 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-02  6:28 The merge from hell Linus Torvalds
2006-02-02  7:05 ` Junio C Hamano
2006-02-02  7:40   ` [PATCH] combine-diff: reuse diff from the same blob Junio C Hamano
2006-02-02  7:51   ` The merge from hell Linus Torvalds
2006-02-02  7:55     ` Linus Torvalds
2006-02-02  8:08       ` Linus Torvalds
2006-02-02  8:18         ` [PATCH] combine-diff: update --cc "uninteresting hunks" logic Junio C Hamano
2006-02-02  9:34           ` [PATCH] combine-diff: add safety check to --cc Junio C Hamano
2006-02-02 23:03             ` Linus Torvalds
2006-02-03  0:02               ` Junio C Hamano
2006-02-03  1:05                 ` Linus Torvalds
2006-02-03  5:49                 ` [Attn - repository browser authors] diff-tree combined format Junio C Hamano
2006-02-03 12:17                   ` Marco Costalba
2006-02-03 19:55                     ` Junio C Hamano [this message]
2006-02-03 21:35                     ` Junio C Hamano
2006-02-04 12:03                       ` Marco Costalba
2006-02-04 11:23                   ` Paul Mackerras
2006-02-03  5:28               ` [PATCH] combine-diff: add safety check to --cc Junio C Hamano
2006-02-04  5:38               ` Paul Mackerras
2006-02-04  6:12                 ` Junio C Hamano
2006-02-04 10:46   ` The merge from hell Paul Mackerras
2006-02-04 12:22     ` Junio C Hamano
2006-02-04 19:42     ` Linus Torvalds
2006-02-04 20:59       ` Linus Torvalds
2006-02-02  7:25 ` Marco Costalba
2006-02-02  8:02   ` Linus Torvalds
2006-02-02  8:07     ` Aneesh Kumar
2006-02-02  8:27       ` Junio C Hamano
2006-02-02  8:44       ` Linus Torvalds
2006-02-02 10:41         ` Junio C Hamano
2006-02-05 19:42           ` Linus Torvalds
2006-02-05 19:49             ` Add a "git show" command to show a commit Linus Torvalds
2006-02-05 19:58               ` Fix git-rev-parse over-eager errors Linus Torvalds
2006-02-05 20:11                 ` Junio C Hamano
2006-02-05 22:03                   ` Linus Torvalds
2006-02-06  6:20                     ` Junio C Hamano
2006-02-05 22:45               ` Add a "git show" command to show a commit Junio C Hamano
2006-02-05 22:55                 ` Linus Torvalds
2006-02-05 22:59                   ` Linus Torvalds
2006-02-06  0:25                     ` Junio C Hamano

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=7vacd8fc94.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox$(echo .)net \
    --cc=aneesh.kumar@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=kay.sievers@suse$(echo .)de \
    --cc=mcostalba@gmail$(echo .)com \
    --cc=mcostalba@yahoo$(echo .)it \
    --cc=paulus@samba$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox