From: Junio C Hamano <gitster@pobox•com>
To: Jeff King <peff@peff•net>
Cc: git@vger•kernel.org
Subject: Re: [BUG] diffcore-rename with duplicate tree entries can segfault
Date: Tue, 24 Feb 2015 21:00:20 -0800 [thread overview]
Message-ID: <xmqq8ufmpouz.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20150224234737.GA8370@peff.net> (Jeff King's message of "Tue, 24 Feb 2015 18:47:37 -0500")
Jeff King <peff@peff•net> writes:
> 3. The sort order check is wrong. :-/ It needs to take into account
> git's magic "if it's a tree, pretend it has '/' after it" rule.
> That's not too hard for a single tree (fsck.c:verify_ordered does
> it). But for filepairs, I'm not sure what to do. Most cases
> have a single mode/name pair. But what about a D/F typechange? If
> "foo" becomes "foo/", which do I use to sort?
I think diff-index populates the diff queue in a wrong order and
then calls diffcore_fix_diff_index() to fix it up.
I am a bit worried about the effect this stricter input check might
have to "diff --no-index" codepath, though.
next prev parent reply other threads:[~2015-02-25 5:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-24 21:43 [BUG] diffcore-rename with duplicate tree entries can segfault Jeff King
2015-02-24 22:42 ` Junio C Hamano
2015-02-24 22:49 ` Jeff King
2015-02-24 23:11 ` Junio C Hamano
2015-02-24 23:47 ` Jeff King
2015-02-25 5:00 ` Junio C Hamano [this message]
2015-02-25 21:40 ` Jeff King
2015-02-25 21:50 ` Junio C Hamano
2015-02-27 1:38 ` [PATCH 0/2] " Jeff King
2015-02-27 1:39 ` [PATCH 1/2] diffcore-rename: split locate_rename_dst into two functions Jeff King
2015-02-27 1:42 ` [PATCH 2/2] diffcore-rename: avoid processing duplicate destinations Jeff King
2015-02-27 21:48 ` 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=xmqq8ufmpouz.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=peff@peff$(echo .)net \
/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