From: Jakub Narebski <jnareb@gmail.com>
To: "Shawn O. Pearce" <spearce@spearce.org>
Cc: Michele Ballabio <barra_cuda@katamail.com>, git@vger.kernel.org
Subject: Re: git-gui: more issues with diff parsing
Date: Fri, 12 Sep 2008 11:01:15 -0700 (PDT) [thread overview]
Message-ID: <m3ljxxnt09.fsf@localhost.localdomain> (raw)
In-Reply-To: <20080912152345.GE22960@spearce.org>
"Shawn O. Pearce" <spearce@spearce.org> writes:
> The diff is weird:
>
> $ git-diff-index --cached -p --no-color -U5 \
> d6e02aa06c91c711d98ae06e6e69c5de5841a5e5 -- g
> diff --git a/g b/g
> deleted file mode 100644
> index e69de29..1a010b1
> diff --git a/g b/g
> new file mode 120000
> index e69de29..1a010b1
> --- /dev/null
> +++ b/g
> @@ -0,0 +1 @@
> +file
> \ No newline at end of file
>
> Notice how we get two diffs for the same file? That's why git-gui
> is choking on this particular change. It expected only one diff
> for the path it gave to Git. It got two back. In cases like this
> we may not be able to support line or hunk application as the patch
> is really two different patches against that path. :-|
Hmmm... it looks _exactly_ like a problem I had with writing
"syntax highlighting" (and linkage) for the patchset part of
'commitdiff' and 'blobdiff' views, namely that typechange
(file to symlink and vice versa) generates two patches for
single difftree (raw diff format output) line.
See git_patchset_body in gitweb/gitweb.perl, and is_patch_split
function, and commit message of 0cec6db (gitweb: Fix and simplify
"split patch" detection), which tells about alternate solution.
--
Jakub Narebski
Poland
ShadeHawk on #git
prev parent reply other threads:[~2008-09-12 18:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-09 8:30 git-gui: more issues with diff parsing Michele Ballabio
2008-09-12 15:23 ` Shawn O. Pearce
2008-09-12 17:06 ` Junio C Hamano
2008-09-12 18:01 ` Jakub Narebski [this message]
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=m3ljxxnt09.fsf@localhost.localdomain \
--to=jnareb@gmail.com \
--cc=barra_cuda@katamail.com \
--cc=git@vger.kernel.org \
--cc=spearce@spearce.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).