summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5b1ea09)
raw | patch | inline | side by side (parent: 5b1ea09)
author | Junio C Hamano <junkio@cox.net> | |
Wed, 8 Jun 2005 09:08:54 +0000 (02:08 -0700) | ||
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | |
Wed, 8 Jun 2005 17:19:53 +0000 (10:19 -0700) |
This updates t1000 (basic 3-way merge test) to check the merge
results for both successful cases (earlier one checked the
result for only one of them). Also fixes typos in t1002 that
broke '&&' chain, potentially missing a test failure before the
chain got broken.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
results for both successful cases (earlier one checked the
result for only one of them). Also fixes typos in t1002 that
broke '&&' chain, potentially missing a test failure before the
chain got broken.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
t/t1000-read-tree-m-3way.sh | patch | blob | history | |
t/t1002-read-tree-m-u-2way.sh | patch | blob | history |
index ba207c8bbfe340e1b315d15faf3dfb8b7b9f4eba..d18f8cbcf4ebc328b4c8d761735f479a7d27d0ed 100755 (executable)
################################################################
# Try merging and showing the various diffs
-# The tree is dirty at this point.
-test_expect_failure \
- '3-way merge with git-read-tree -m' \
- "git-read-tree -m $tree_O $tree_A $tree_B"
-
-# This is done on an empty work directory, which is the normal
-# merge person behaviour.
-test_expect_success \
- '3-way merge with git-read-tree -m' \
- "rm -fr [NDMALTS][NDMALTSF] Z &&
- rm .git/index &&
- git-read-tree -m $tree_O $tree_A $tree_B"
-
-# This starts out with the first head, which is the normal
-# patch submitter behaviour.
-test_expect_success \
- '3-way merge with git-read-tree -m' \
- "git-read-tree $tree_A &&
- git-checkout-cache -f -u -a &&
- git-read-tree -m $tree_O $tree_A $tree_B"
-
-_x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'
-_x40="$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40"
-test_expect_success \
- 'git-ls-files --stage of the merge result' \
- 'git-ls-files --stage >current- &&
- sed -e "s/ $_x40 / X /" <current- >current'
-
cat >expected <<\EOF
100644 X 2 AA
100644 X 3 AA
100644 X 0 Z/NN
EOF
+_x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'
+_x40="$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40"
+
+# The tree is dirty at this point.
+test_expect_failure \
+ '3-way merge with git-read-tree -m, dirty cache' \
+ "git-read-tree -m $tree_O $tree_A $tree_B"
+
+# This is done on an empty work directory, which is the normal
+# merge person behaviour.
+test_expect_success \
+ '3-way merge with git-read-tree -m, empty cache' \
+ "rm -fr [NDMALTS][NDMALTSF] Z &&
+ rm .git/index &&
+ git-read-tree -m $tree_O $tree_A $tree_B &&
+ git-ls-files --stage |
+ sed -e 's/ $_x40 / X /' >current &&
+ diff -u expected current"
+
+# This starts out with the first head, which is the normal
+# patch submitter behaviour.
test_expect_success \
- 'validate merge result' \
- 'diff current expected'
+ '3-way merge with git-read-tree -m, match H' \
+ "git-read-tree $tree_A &&
+ git-checkout-cache -f -u -a &&
+ git-read-tree -m $tree_O $tree_A $tree_B &&
+ git-ls-files --stage |
+ sed -e 's/ $_x40 / X /' >current &&
+ diff -u expected current"
test_done
index 75a4eaaf21f4960371f6f6b4a674a45cec95d31e..aebe21a6b67803e4bc9a08728c6ef4398a705bad 100755 (executable)
compare_change 5diff.out expected &&
check_cache_at yomin dirty &&
sha1sum -c M.sha1 &&
- : dirty index should have prevented -u from checking it out.
+ : dirty index should have prevented -u from checking it out. &&
echo yomin yomin >yomin1 &&
diff yomin yomin1 &&
rm -f yomin1'
diff --unified=0 M.out 7.out &&
check_cache_at frotz dirty &&
if sha1sum -c M.sha1; then false; else :; fi &&
- : dirty index should have prevented -u from checking it out.
+ : dirty index should have prevented -u from checking it out. &&
echo frotz frotz >frotz1 &&
diff frotz frotz1 &&
rm -f frotz1'