Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Linus Torvalds <torvalds@osdl.org>
Cc: git@vger.kernel.org
Subject: Re: "git-diff-tree -R A B == git-diff-tree B A"?
Date: Fri, 20 May 2005 08:29:22 -0700	[thread overview]
Message-ID: <7v64xdvru5.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <Pine.LNX.4.58.0505200806150.2206@ppc970.osdl.org> (Linus Torvalds's message of "Fri, 20 May 2005 08:20:21 -0700 (PDT)")

>>>>> "LT" == Linus Torvalds <torvalds@osdl.org> writes:

LT> On Fri, 20 May 2005, Junio C Hamano wrote:
>> 
>> I was preparing a set of tests for diff family because I wanted
>> to have something that catches screwups I am going to inflict
>> upon them during the coming couple of days.  One of the tests
>> accidentally found out that the above is not true in the current
>> implementation.  Just an excerpt of relevant lines [*1*]:
>> 
>> $ git-diff-tree -r $tree_B $tree_A
>> 
>> +100644 blob 7e426fb079479fd67f6d81f984e4ec649a44bc25 AN
>> +100644 blob 68a6d8b91da11045cf4aa3a5ab9f2a781c701249 DF/DF
>> -100644 blob 71420ab81e254145d26d6fc0cddee64c1acd4787 DF
>> -100644 blob 3c4d8de5fbad08572bab8e10eef8dbb264cf0231 DM
>> 
>> $ git-diff-tree -R $tree_A $tree_B
>> 
>> +100644 blob 7e426fb079479fd67f6d81f984e4ec649a44bc25 AN
>> -100644 blob 71420ab81e254145d26d6fc0cddee64c1acd4787 DF
>> +100644 blob 68a6d8b91da11045cf4aa3a5ab9f2a781c701249 DF/DF
>> -100644 blob 3c4d8de5fbad08572bab8e10eef8dbb264cf0231 DM


LT> Ahh.. "diff-tree" uses the wrong algorithm for selecting name ordering.

LT> It thinks that "DF" and "DF/" sort equally because it just looks at the
LT> name, not the type. So then, becuse the names sort the same, it will sort
LT> them according to where they come from, and you get the behaviour you see.

LT> It doesn't really matter, but you're right, I should fix it to be
LT> consistent.

Don't bother.  I already have a fix with the test case.


  reply	other threads:[~2005-05-20 15:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-20 14:56 "git-diff-tree -R A B == git-diff-tree B A"? Junio C Hamano
2005-05-20 15:20 ` Linus Torvalds
2005-05-20 15:29   ` Junio C Hamano [this message]
2005-05-20 15:32   ` Junio C Hamano
2005-05-20 15:53     ` Linus Torvalds
2005-05-20 15:57       ` Linus Torvalds
2005-05-20 16:19       ` Linus Torvalds
2005-05-20 16:48       ` Junio C Hamano
2005-05-20 16:54   ` [PATCH] Simplify "reverse-diff" logic in the diff core 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=7v64xdvru5.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=git@vger.kernel.org \
    --cc=torvalds@osdl.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