summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b49c452)
raw | patch | inline | side by side (parent: b49c452)
author | Jens Lehmann <Jens.Lehmann@web.de> | |
Wed, 1 Sep 2010 21:01:49 +0000 (23:01 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 3 Sep 2010 16:33:23 +0000 (09:33 -0700) |
Instead of using `cd dir && (...) && cd..` use `(cd dir && ...)`
This ensures that the test doesn't get caught in the subdirectory if there
is an error in the subshell.
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This ensures that the test doesn't get caught in the subdirectory if there
is an error in the subshell.
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t7405-submodule-merge.sh | patch | blob | history |
index 6ec559db0fd2c1a7ef560543816ac2b5cf784809..7e2e258950772c91dfc04aff72ed74e95b5df884 100755 (executable)
# b in the main repository.
test_expect_success 'setup for merge search' '
mkdir merge-search &&
- cd merge-search &&
+ (cd merge-search &&
git init &&
mkdir sub &&
(cd sub &&
git checkout -b sub-d sub-b &&
git merge sub-c) &&
git commit -a -m "d" &&
- git branch test b &&
- cd ..
+ git branch test b)
'
test_expect_success 'merge with one side as a fast-forward of the other' '
'
test_expect_success 'merging should fail for ambiguous common parent' '
- cd merge-search &&
+ (cd merge-search &&
git checkout -b test-ambiguous b &&
(cd sub &&
git checkout -b ambiguous sub-b &&
test_must_fail git merge c 2> actual &&
grep $(cat expect1) actual > /dev/null &&
grep $(cat expect2) actual > /dev/null &&
- git reset --hard &&
- cd ..
+ git reset --hard)
'
# in a situation like this
# commits (sub-a) does not descend from the submodule merge-base (sub-b).
#
test_expect_success 'merging should fail for changes that are backwards' '
- cd merge-search &&
+ (cd merge-search &&
git checkout -b bb a &&
(cd sub &&
git checkout sub-b) &&
git commit -a -m "f" &&
git checkout -b test-backward e &&
- test_must_fail git merge f &&
- cd ..
+ test_must_fail git merge f)
'
test_expect_success 'merging with a modify/modify conflict between merge bases' '
-
git reset --hard HEAD &&
git checkout -b test2 c &&
git merge d
-
'
test_done