Re: [RFC PATCH] merge-recursive: symlink's descendants not in way
- From
SZEDER Gábor <szeder.dev@gmail.com>
- Date
- Sep 17, 2019, 23:02 UTC
- Message-ID
- <20190917230224.GB29845@szeder.dev>
- In-Reply-To
- <20190917215040.132503-1-jonathantanmy@google.com>
On Tue, Sep 17, 2019 at 02:50:40PM -0700, Jonathan Tan wrote:
Show 9 quoted lines
> diff --git a/t/t3030-merge-recursive.sh b/t/t3030-merge-recursive.sh > index ff641b348a..dfd617a845 100755 > --- a/t/t3030-merge-recursive.sh > +++ b/t/t3030-merge-recursive.sh > @@ -452,6 +452,33 @@ test_expect_success 'merge-recursive d/f conflict result' ' > > ' > > +test_expect_success 'dir in working tree with symlink ancestor does not produce d/f conflict' '
This test needs the SYMLINKS prereq.
Show 6 quoted lines
> + git init sym && > + ( > + cd sym && > + ln -s . foo && > + mkdir bar && > + touch bar/file &&
Nit: >bar/file (though because of the symlink this test won't be run on the most fork()-challenged platform).
Show 17 quoted lines
> + git add foo bar/file && > + git commit -m "foo symlink" && > + > + git checkout -b branch1 && > + git commit --allow-empty -m "empty commit" && > + > + git checkout master && > + git rm foo && > + mkdir foo && > + touch foo/bar && > + git add foo/bar && > + git commit -m "replace foo symlink with real foo dir and foo/bar file" && > + > + git checkout branch1 && > + > + # Exercise to make sure that this works without errors > + git cherry-pick master
Working without errors is great, but I think this test should also check that the results are as expected, e.g. 'foo' is now a directory, etc.
Show 9 quoted lines
> + ) > +' > + > test_expect_success 'reset and 3-way merge' ' > > git reset --hard "$c2" && > -- > 2.23.0.237.gc6a4ce50a0-goog >