git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Nicolas Pitre <nico@cam.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: "git pull" throws away dirty state
Date: Sun, 16 Mar 2008 13:50:23 -0700	[thread overview]
Message-ID: <7vprtuieb4.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <alpine.LFD.1.00.0803161434450.2947@xanadu.home> (Nicolas Pitre's message of "Sun, 16 Mar 2008 14:37:34 -0400 (EDT)")

Nicolas Pitre <nico@cam.org> writes:

> On Sun, 16 Mar 2008, Linus Torvalds wrote:
>
>> On Sun, 16 Mar 2008, Linus Torvalds wrote:
>> > 
>> > Ok, this is distressing, and I suspect it's another bug of mine due to 
>> > unpack-trees changes, but before I delve into it deeper I thought I'd 
>> > report it here and see if others see it too, and maybe it's due to 
>> > something else..
>> 
>> Nope, I bisected it down to
>> 
>> 	34110cd4e394e3f92c01a4709689b384c34645d8 is first bad commit
>> 
>> 	Make 'unpack_trees()' have a separate source and destination index
>> 
>> and I'm trying to figure out what part of that triggered this bug.
>
> We really should have more tests to cover all those bugs that were 
> introduced and fixed lately.
>
> Given that Git should work fine in some cases even with a dirty work 
> tree by design, I'm a bit surprised that we don't have any test case 
> covering that.

Yeah, I was wondering why these are not covered by
t/t1000-read-tree-m-3way:

  "git read-tree -m O A B"

       O       A       B         result      index requirements
  -------------------------------------------------------------------
    12  exists  O!=A    O!=B      take A      must match A, if exists.
                        A==B
    ------------------------------------------------------------------
    13  exists  O!=A    O==B      take A      must match A, if exists.
    ------------------------------------------------------------------
    14  exists  O==A    O!=B      take B      if exists, must either (1)
                                             match A and be up-to-date,
                                             or (2) match B.
   ------------------------------------------------------------------

But this one tests only "read-tree -m", not "read-tree -m -u".  The tests
for "-m -u" we have in t1004 is not about being comprehensive like t1000
(which covers all cases in the case table) but seems to be more about
randomly selected cases.

Patches?

  reply	other threads:[~2008-03-16 20:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-16 18:08 "git pull" throws away dirty state Linus Torvalds
2008-03-16 18:24 ` Linus Torvalds
2008-03-16 18:37   ` Nicolas Pitre
2008-03-16 20:50     ` Junio C Hamano [this message]
2008-03-16 21:13       ` Junio C Hamano
2008-03-16 18:42   ` [PATCH] Don't update unchanged merge entries Linus Torvalds
2008-03-16 20:00     ` Daniel Barkalow
2008-03-16 20:40       ` Linus Torvalds
2008-03-16 21:10         ` Daniel Barkalow
2008-03-16 21:15           ` Linus Torvalds
2008-03-16 21:25             ` 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=7vprtuieb4.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=nico@cam.org \
    --cc=torvalds@linux-foundation.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).