t7000-t7999: fix broken &&-chains
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
c8ce3763ff
commit
e974e06de0
@ -509,7 +509,7 @@ test_expect_success 'moving nested submodules' '
|
|||||||
touch nested_level1 &&
|
touch nested_level1 &&
|
||||||
git init &&
|
git init &&
|
||||||
git add . &&
|
git add . &&
|
||||||
git commit -m "nested level 1"
|
git commit -m "nested level 1" &&
|
||||||
git submodule add ../sub_nested_nested &&
|
git submodule add ../sub_nested_nested &&
|
||||||
git commit -m "add nested level 2"
|
git commit -m "add nested level 2"
|
||||||
) &&
|
) &&
|
||||||
|
@ -528,10 +528,10 @@ test_expect_success 'checkout with --merge' '
|
|||||||
cat sample >filf &&
|
cat sample >filf &&
|
||||||
git checkout -m -- fild file filf &&
|
git checkout -m -- fild file filf &&
|
||||||
(
|
(
|
||||||
echo "<<<<<<< ours"
|
echo "<<<<<<< ours" &&
|
||||||
echo ourside
|
echo ourside &&
|
||||||
echo "======="
|
echo "=======" &&
|
||||||
echo theirside
|
echo theirside &&
|
||||||
echo ">>>>>>> theirs"
|
echo ">>>>>>> theirs"
|
||||||
) >merged &&
|
) >merged &&
|
||||||
test_cmp expect fild &&
|
test_cmp expect fild &&
|
||||||
@ -549,12 +549,12 @@ test_expect_success 'checkout with --merge, in diff3 -m style' '
|
|||||||
cat sample >filf &&
|
cat sample >filf &&
|
||||||
git checkout -m -- fild file filf &&
|
git checkout -m -- fild file filf &&
|
||||||
(
|
(
|
||||||
echo "<<<<<<< ours"
|
echo "<<<<<<< ours" &&
|
||||||
echo ourside
|
echo ourside &&
|
||||||
echo "||||||| base"
|
echo "||||||| base" &&
|
||||||
echo original
|
echo original &&
|
||||||
echo "======="
|
echo "=======" &&
|
||||||
echo theirside
|
echo theirside &&
|
||||||
echo ">>>>>>> theirs"
|
echo ">>>>>>> theirs"
|
||||||
) >merged &&
|
) >merged &&
|
||||||
test_cmp expect fild &&
|
test_cmp expect fild &&
|
||||||
@ -572,10 +572,10 @@ test_expect_success 'checkout --conflict=merge, overriding config' '
|
|||||||
cat sample >filf &&
|
cat sample >filf &&
|
||||||
git checkout --conflict=merge -- fild file filf &&
|
git checkout --conflict=merge -- fild file filf &&
|
||||||
(
|
(
|
||||||
echo "<<<<<<< ours"
|
echo "<<<<<<< ours" &&
|
||||||
echo ourside
|
echo ourside &&
|
||||||
echo "======="
|
echo "=======" &&
|
||||||
echo theirside
|
echo theirside &&
|
||||||
echo ">>>>>>> theirs"
|
echo ">>>>>>> theirs"
|
||||||
) >merged &&
|
) >merged &&
|
||||||
test_cmp expect fild &&
|
test_cmp expect fild &&
|
||||||
@ -593,12 +593,12 @@ test_expect_success 'checkout --conflict=diff3' '
|
|||||||
cat sample >filf &&
|
cat sample >filf &&
|
||||||
git checkout --conflict=diff3 -- fild file filf &&
|
git checkout --conflict=diff3 -- fild file filf &&
|
||||||
(
|
(
|
||||||
echo "<<<<<<< ours"
|
echo "<<<<<<< ours" &&
|
||||||
echo ourside
|
echo ourside &&
|
||||||
echo "||||||| base"
|
echo "||||||| base" &&
|
||||||
echo original
|
echo original &&
|
||||||
echo "======="
|
echo "=======" &&
|
||||||
echo theirside
|
echo theirside &&
|
||||||
echo ">>>>>>> theirs"
|
echo ">>>>>>> theirs"
|
||||||
) >merged &&
|
) >merged &&
|
||||||
test_cmp expect fild &&
|
test_cmp expect fild &&
|
||||||
|
@ -819,7 +819,7 @@ test_expect_success '../bar/a/b/c works with relative local path - ../foo/bar.gi
|
|||||||
cp pristine-.git-config .git/config &&
|
cp pristine-.git-config .git/config &&
|
||||||
cp pristine-.gitmodules .gitmodules &&
|
cp pristine-.gitmodules .gitmodules &&
|
||||||
mkdir -p a/b/c &&
|
mkdir -p a/b/c &&
|
||||||
(cd a/b/c; git init) &&
|
(cd a/b/c && git init) &&
|
||||||
git config remote.origin.url ../foo/bar.git &&
|
git config remote.origin.url ../foo/bar.git &&
|
||||||
git submodule add ../bar/a/b/c ./a/b/c &&
|
git submodule add ../bar/a/b/c ./a/b/c &&
|
||||||
git submodule init &&
|
git submodule init &&
|
||||||
|
@ -865,9 +865,9 @@ test_expect_success 'submodule update places git-dir in superprojects git-dir re
|
|||||||
(cd submodule/subsubmodule &&
|
(cd submodule/subsubmodule &&
|
||||||
git log > ../../expected
|
git log > ../../expected
|
||||||
) &&
|
) &&
|
||||||
(cd .git/modules/submodule/modules/subsubmodule
|
(cd .git/modules/submodule/modules/subsubmodule &&
|
||||||
git log > ../../../../../actual
|
git log > ../../../../../actual
|
||||||
)
|
) &&
|
||||||
test_cmp actual expected
|
test_cmp actual expected
|
||||||
)
|
)
|
||||||
'
|
'
|
||||||
@ -886,7 +886,7 @@ test_expect_success 'submodule update properly revives a moved submodule' '
|
|||||||
git commit -am "pre move" &&
|
git commit -am "pre move" &&
|
||||||
H2=$(git rev-parse --short HEAD) &&
|
H2=$(git rev-parse --short HEAD) &&
|
||||||
git status | sed "s/$H/XXX/" >expect &&
|
git status | sed "s/$H/XXX/" >expect &&
|
||||||
H=$(cd submodule2; git rev-parse HEAD) &&
|
H=$(cd submodule2 && git rev-parse HEAD) &&
|
||||||
git rm --cached submodule2 &&
|
git rm --cached submodule2 &&
|
||||||
rm -rf submodule2 &&
|
rm -rf submodule2 &&
|
||||||
mkdir -p "moved/sub module" &&
|
mkdir -p "moved/sub module" &&
|
||||||
|
@ -148,7 +148,7 @@ test_expect_success 'preparing second superproject with a nested submodule plus
|
|||||||
cd supersuper &&
|
cd supersuper &&
|
||||||
echo "I am super super." >file &&
|
echo "I am super super." >file &&
|
||||||
git add file &&
|
git add file &&
|
||||||
git commit -m B-super-super-initial
|
git commit -m B-super-super-initial &&
|
||||||
git submodule add "file://$base_dir/super" subwithsub &&
|
git submodule add "file://$base_dir/super" subwithsub &&
|
||||||
git commit -m B-super-super-added &&
|
git commit -m B-super-super-added &&
|
||||||
git submodule update --init --recursive &&
|
git submodule update --init --recursive &&
|
||||||
|
@ -411,8 +411,8 @@ test_expect_success 'sign off (1)' '
|
|||||||
git commit -s -m "thank you" &&
|
git commit -s -m "thank you" &&
|
||||||
git cat-file commit HEAD | sed -e "1,/^\$/d" >actual &&
|
git cat-file commit HEAD | sed -e "1,/^\$/d" >actual &&
|
||||||
(
|
(
|
||||||
echo thank you
|
echo thank you &&
|
||||||
echo
|
echo &&
|
||||||
git var GIT_COMMITTER_IDENT |
|
git var GIT_COMMITTER_IDENT |
|
||||||
sed -e "s/>.*/>/" -e "s/^/Signed-off-by: /"
|
sed -e "s/>.*/>/" -e "s/^/Signed-off-by: /"
|
||||||
) >expected &&
|
) >expected &&
|
||||||
@ -430,9 +430,9 @@ test_expect_success 'sign off (2)' '
|
|||||||
$existing" &&
|
$existing" &&
|
||||||
git cat-file commit HEAD | sed -e "1,/^\$/d" >actual &&
|
git cat-file commit HEAD | sed -e "1,/^\$/d" >actual &&
|
||||||
(
|
(
|
||||||
echo thank you
|
echo thank you &&
|
||||||
echo
|
echo &&
|
||||||
echo $existing
|
echo $existing &&
|
||||||
git var GIT_COMMITTER_IDENT |
|
git var GIT_COMMITTER_IDENT |
|
||||||
sed -e "s/>.*/>/" -e "s/^/Signed-off-by: /"
|
sed -e "s/>.*/>/" -e "s/^/Signed-off-by: /"
|
||||||
) >expected &&
|
) >expected &&
|
||||||
@ -450,9 +450,9 @@ test_expect_success 'signoff gap' '
|
|||||||
$alt" &&
|
$alt" &&
|
||||||
git cat-file commit HEAD | sed -e "1,/^\$/d" > actual &&
|
git cat-file commit HEAD | sed -e "1,/^\$/d" > actual &&
|
||||||
(
|
(
|
||||||
echo welcome
|
echo welcome &&
|
||||||
echo
|
echo &&
|
||||||
echo $alt
|
echo $alt &&
|
||||||
git var GIT_COMMITTER_IDENT |
|
git var GIT_COMMITTER_IDENT |
|
||||||
sed -e "s/>.*/>/" -e "s/^/Signed-off-by: /"
|
sed -e "s/>.*/>/" -e "s/^/Signed-off-by: /"
|
||||||
) >expected &&
|
) >expected &&
|
||||||
@ -470,11 +470,11 @@ We have now
|
|||||||
$alt" &&
|
$alt" &&
|
||||||
git cat-file commit HEAD | sed -e "1,/^\$/d" > actual &&
|
git cat-file commit HEAD | sed -e "1,/^\$/d" > actual &&
|
||||||
(
|
(
|
||||||
echo welcome
|
echo welcome &&
|
||||||
echo
|
echo &&
|
||||||
echo We have now
|
echo We have now &&
|
||||||
echo $alt
|
echo $alt &&
|
||||||
echo
|
echo &&
|
||||||
git var GIT_COMMITTER_IDENT |
|
git var GIT_COMMITTER_IDENT |
|
||||||
sed -e "s/>.*/>/" -e "s/^/Signed-off-by: /"
|
sed -e "s/>.*/>/" -e "s/^/Signed-off-by: /"
|
||||||
) >expected &&
|
) >expected &&
|
||||||
@ -491,11 +491,11 @@ non-trailer line
|
|||||||
Myfooter: x" &&
|
Myfooter: x" &&
|
||||||
git cat-file commit HEAD | sed -e "1,/^\$/d" > actual &&
|
git cat-file commit HEAD | sed -e "1,/^\$/d" > actual &&
|
||||||
(
|
(
|
||||||
echo subject
|
echo subject &&
|
||||||
echo
|
echo &&
|
||||||
echo non-trailer line
|
echo non-trailer line &&
|
||||||
echo Myfooter: x
|
echo Myfooter: x &&
|
||||||
echo
|
echo &&
|
||||||
echo "Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>"
|
echo "Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>"
|
||||||
) >expected &&
|
) >expected &&
|
||||||
test_cmp expected actual &&
|
test_cmp expected actual &&
|
||||||
@ -508,10 +508,10 @@ non-trailer line
|
|||||||
Myfooter: x" &&
|
Myfooter: x" &&
|
||||||
git cat-file commit HEAD | sed -e "1,/^\$/d" > actual &&
|
git cat-file commit HEAD | sed -e "1,/^\$/d" > actual &&
|
||||||
(
|
(
|
||||||
echo subject
|
echo subject &&
|
||||||
echo
|
echo &&
|
||||||
echo non-trailer line
|
echo non-trailer line &&
|
||||||
echo Myfooter: x
|
echo Myfooter: x &&
|
||||||
echo "Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>"
|
echo "Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>"
|
||||||
) >expected &&
|
) >expected &&
|
||||||
test_cmp expected actual
|
test_cmp expected actual
|
||||||
@ -524,10 +524,10 @@ test_expect_success 'multiple -m' '
|
|||||||
git commit -m "one" -m "two" -m "three" &&
|
git commit -m "one" -m "two" -m "three" &&
|
||||||
git cat-file commit HEAD | sed -e "1,/^\$/d" >actual &&
|
git cat-file commit HEAD | sed -e "1,/^\$/d" >actual &&
|
||||||
(
|
(
|
||||||
echo one
|
echo one &&
|
||||||
echo
|
echo &&
|
||||||
echo two
|
echo two &&
|
||||||
echo
|
echo &&
|
||||||
echo three
|
echo three
|
||||||
) >expected &&
|
) >expected &&
|
||||||
test_cmp expected actual
|
test_cmp expected actual
|
||||||
|
@ -193,9 +193,9 @@ test_expect_success 'status with added and untracked file in modified submodule
|
|||||||
|
|
||||||
test_expect_success 'setup .git file for sub' '
|
test_expect_success 'setup .git file for sub' '
|
||||||
(cd sub &&
|
(cd sub &&
|
||||||
rm -f new-file
|
rm -f new-file &&
|
||||||
REAL="$(pwd)/../.real" &&
|
REAL="$(pwd)/../.real" &&
|
||||||
mv .git "$REAL"
|
mv .git "$REAL" &&
|
||||||
echo "gitdir: $REAL" >.git) &&
|
echo "gitdir: $REAL" >.git) &&
|
||||||
echo .real >>.gitignore &&
|
echo .real >>.gitignore &&
|
||||||
git commit -m "added .real to .gitignore" .gitignore
|
git commit -m "added .real to .gitignore" .gitignore
|
||||||
@ -209,12 +209,12 @@ test_expect_success 'status with added file in modified submodule with .git file
|
|||||||
|
|
||||||
test_expect_success 'status with a lot of untracked files in the submodule' '
|
test_expect_success 'status with a lot of untracked files in the submodule' '
|
||||||
(
|
(
|
||||||
cd sub
|
cd sub &&
|
||||||
i=0 &&
|
i=0 &&
|
||||||
while test $i -lt 1024
|
while test $i -lt 1024
|
||||||
do
|
do
|
||||||
>some-file-$i
|
>some-file-$i &&
|
||||||
i=$(( $i + 1 ))
|
i=$(( $i + 1 )) || exit 1
|
||||||
done
|
done
|
||||||
) &&
|
) &&
|
||||||
git status --porcelain sub 2>err.actual &&
|
git status --porcelain sub 2>err.actual &&
|
||||||
|
Reference in New Issue
Block a user