git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.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 10:06:18 -0700	[thread overview]
Message-ID: <7vy71xpa45.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <20080912152345.GE22960@spearce.org> (Shawn O. Pearce's message of "Fri, 12 Sep 2008 08:23:45 -0700")

"Shawn O. Pearce" <spearce@spearce.org> writes:

> 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.  :-|
>
>> The following patch seems to fix this particular issue, but I don't think
>> it's the right fix...
>
> I don't think that is the right fix, but the one that I just tried to
> write to do clear_diff when we see the second diff --git line didn't
> work either.  Plus we probably need to disable the hunk apply code.

You will have the same issue not for submodules, too.  A typechange has
always been expressed as delete followed by create.

Probably you already have learned the nature of change (i.e. create?
modify? delete? typechange?) when you populate the list of files with
changes that could be staged, which means by the time the user picks from
the liast you already know if it is a typechange.

  reply	other threads:[~2008-09-12 17:07 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 [this message]
2008-09-12 18:01   ` Jakub Narebski

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=7vy71xpa45.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.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).