From: Junio C Hamano <gitster@pobox.com>
To: "Pickens\, James E" <james.e.pickens@intel.com>
Cc: "git\@vger.kernel.org" <git@vger.kernel.org>,
Kjetil Barvik <barvik@broadpark.no>,
Michael J Gruber <git@drmicha.warpmail.net>
Subject: Re: [PATCH v2] Demonstrate bugs when a directory is replaced with a symlink
Date: Wed, 29 Jul 2009 11:31:17 -0700 [thread overview]
Message-ID: <7v63dbuyru.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <3BA20DF9B35F384F8B7395B001EC3FB342402AD9@azsmsx507.amr.corp.intel.com> (James E. Pickens's message of "Wed\, 29 Jul 2009 10\:48\:11 -0700")
"Pickens, James E" <james.e.pickens@intel.com> writes:
> This test creates two directories, a/b and a/b-2, then replaces a/b with
> a symlink to a/b-2, then merges that change into another branch that
> contains an unrelated change.
Thanks.
> Note that using the resolve strategy instead of recursive makes the
> second bug go away, but not the third one.
It is better to have separate tests for documentation purposes to help
people who track down the breakage in such a case.
> +test_expect_failure 'checkout should not have deleted a/b-2/c/d' '
> + test -f a/b-2/c/d
> +'
> +
> +test_expect_success 'clean the work tree and do the merge' '
> + git reset --hard &&
> + test -f a/b-2/c/d &&
> + echo x > a/x &&
> + git add a/x &&
> + git commit -m x &&
> + git merge master
> +'
> +
> +test_expect_failure 'merge should not have deleted a/b-2/c/d' '
> + test -f a/b-2/c/d
> +'
So...
test_expect_success 'setup for merge test' '
...
git commit -m x &&
git tag baseline
'
test_expect_success 'do not lose a/b-2/c/d in merge (resolve)' '
git reset --hard &&
git checkout baseline^0 &&
git merge -s resolve master
'
test_expect_failure 'do not lose a/b-2/c/d in merge (recursive)' '
git reset --hard &&
git checkout baseline^0 &&
git merge -s recursive master
'
Likewise for the other one.
next prev parent reply other threads:[~2009-07-29 18:31 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
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 [this message]
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=7v63dbuyru.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.