git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Michael J Gruber <git@drmicha.warpmail.net>
Cc: James Pickens <james.e.pickens@intel.com>,
	git@vger.kernel.org, gitster@pobox.com,
	Kjetil Barvik <barvik@broadpark.no>
Subject: Re: [PATCH 1/2] Demonstrate bugs when a directory is replaced with a symlink.
Date: Wed, 29 Jul 2009 01:33:29 -0700	[thread overview]
Message-ID: <7v4osvyjl2.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: 4A70062A.4040008@drmicha.warpmail.net

Michael J Gruber <git@drmicha.warpmail.net> writes:

>> +test_expect_failure 'checkout should not delete a/b-2/c/d' '
>> +	git checkout -b temp HEAD^ &&
>> +	test -f a/b-2/c/d
>> +'
>> +
>> +test_expect_failure 'merge should not delete a/b-2/c/d' '
>> +	echo x > a/x &&
>> +	git add a/x &&
>> +	git commit -m x &&
>> +	git merge master &&
>> +	test -f a/b-2/c/d
>> +'
>> +
>> +test_done
>
> Isn't the failure of the second test caused by that of the first one?
> a/b-2/c/d is gone from the worktree, and master does not touch it, so
> the merge leaves the worktree version (non-existent) as is.

To avoid that impression the second test should probably have been written
to start from a clean slate, using "reset --hard" or something.

Kjetil's patch actually fixes the first one, but the second one will still
show breakage.

I wonder if the breakage is in recursive merge or in the generic read-tree
three-way merge code.  I highly suspect that using "git merge -s resolve"
would make the test pass.  Historically recursive merge is known to be
careless in many corner cases.

  reply	other threads:[~2009-07-29  8:33 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-28 22:13 More symlink/directory troubles James Pickens
2009-07-28 22:13 ` [PATCH 1/2] Demonstrate bugs when a directory is replaced with a symlink James Pickens
2009-07-28 22:13   ` [PATCH 2/2] Demonstrate merge failure " James Pickens
2009-07-29  8:29     ` Michael J Gruber
2009-07-29 16:39       ` Pickens, James E
2009-07-29  8:19   ` [PATCH 1/2] Demonstrate bugs " Michael J Gruber
2009-07-29  8:33     ` Junio C Hamano [this message]
2009-07-29 16:57       ` Pickens, James E
2009-07-29 17:48       ` [PATCH v2] " Pickens, James E
2009-07-29 18:31         ` Junio C Hamano
2009-07-29 21:02           ` [PATCH v3] " Pickens, James E
2009-07-29 22:08             ` Linus Torvalds
2009-07-29 22:44               ` Junio C Hamano
2009-07-29 23:01               ` Kjetil Barvik
2009-07-29 23:58               ` Linus Torvalds
2009-07-30  1:06                 ` Linus Torvalds
2009-07-30  3:26               ` Junio C Hamano
2009-07-30  6:05               ` 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=7v4osvyjl2.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=barvik@broadpark.no \
    --cc=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=james.e.pickens@intel.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).