From: Johannes Sixt <j.sixt@viscovery.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: git diff --cc bug
Date: Thu, 19 Jun 2008 10:11:35 +0200 [thread overview]
Message-ID: <485A14B7.8080807@viscovery.net> (raw)
In-Reply-To: <7vhcbpx6bq.fsf@gitster.siamese.dyndns.org>
Junio C Hamano schrieb:
> The problem is that the internal data structure hooks the deleted lines in
> front of the surviving line that follows it. That means that showing the
> sline[] that holds "void CValuesView::" will show the unwanted "-LRESULT"
> deletion part as part of it.
>
> You can view this in action by running "git diff -U2" in your tarball
> repository. By reducing the context to 2, the leading edge context now
> begins at the opening brace after "void CValuesView::" line, which does
> not have deletion lines in front of it, so you will see what you expect.
>
> This patch would fix it for the sample repository, but I am not sure if it
> has unintended side effects.
I can verify that it fixes the case in hands as well as a "symmetric" one
where the accidentally visible deletion is against the first parent, i.e.
it looks like "- delete_me" instead of the " -delete_me" above. I also did
some brief tests with various "normal" conflict diffs, and looked at a
number of merges in my repository, and I noticed nothing odd with this
patch. So:
Tested-by: Johannes Sixt <johannes.sixt@telecom.at>
-- Hannes
prev parent reply other threads:[~2008-06-19 8:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-12 11:48 git diff --cc bug Johannes Sixt
2008-06-16 11:48 ` Johannes Sixt
2008-06-19 6:54 ` Junio C Hamano
2008-06-19 8:11 ` Johannes Sixt [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=485A14B7.8080807@viscovery.net \
--to=j.sixt@viscovery.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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).