t3000-t3999: fix broken &&-chains
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
parent
2c2d0f9f47
commit
3ea6737993
|
@ -84,7 +84,7 @@ test_expect_success SYMLINKS 'ls-files --others with symlinked submodule' '
|
||||||
) &&
|
) &&
|
||||||
(
|
(
|
||||||
cd super &&
|
cd super &&
|
||||||
"$SHELL_PATH" "$TEST_DIRECTORY/../contrib/workdir/git-new-workdir" ../sub sub
|
"$SHELL_PATH" "$TEST_DIRECTORY/../contrib/workdir/git-new-workdir" ../sub sub &&
|
||||||
git ls-files --others --exclude-standard >../actual
|
git ls-files --others --exclude-standard >../actual
|
||||||
) &&
|
) &&
|
||||||
echo sub/ >expect &&
|
echo sub/ >expect &&
|
||||||
|
|
|
@ -29,7 +29,7 @@ test_expect_success 'overly-long path does not replace another by mistake' '
|
||||||
printf "$pat" "$blob_a" "$path_a" "$blob_z" "$path_z" |
|
printf "$pat" "$blob_a" "$path_a" "$blob_z" "$path_z" |
|
||||||
git update-index --add --index-info &&
|
git update-index --add --index-info &&
|
||||||
(
|
(
|
||||||
echo "$path_a"
|
echo "$path_a" &&
|
||||||
echo "$path_z"
|
echo "$path_z"
|
||||||
) >expect &&
|
) >expect &&
|
||||||
git ls-files >actual &&
|
git ls-files >actual &&
|
||||||
|
|
|
@ -14,10 +14,10 @@ LAZY_THREAD_COST=2000
|
||||||
|
|
||||||
test_expect_success 'no buffer overflow in lazy_init_name_hash' '
|
test_expect_success 'no buffer overflow in lazy_init_name_hash' '
|
||||||
(
|
(
|
||||||
test_seq $LAZY_THREAD_COST | sed "s/^/a_/"
|
test_seq $LAZY_THREAD_COST | sed "s/^/a_/" &&
|
||||||
echo b/b/b
|
echo b/b/b &&
|
||||||
test_seq $LAZY_THREAD_COST | sed "s/^/c_/"
|
test_seq $LAZY_THREAD_COST | sed "s/^/c_/" &&
|
||||||
test_seq 50 | sed "s/^/d_/" | tr "\n" "/"; echo d
|
test_seq 50 | sed "s/^/d_/" | tr "\n" "/" && echo d
|
||||||
) |
|
) |
|
||||||
sed "s/^/100644 $EMPTY_BLOB /" |
|
sed "s/^/100644 $EMPTY_BLOB /" |
|
||||||
git update-index --index-info &&
|
git update-index --index-info &&
|
||||||
|
|
|
@ -21,10 +21,10 @@ test_expect_success setup '
|
||||||
|
|
||||||
test_expect_success clone '
|
test_expect_success clone '
|
||||||
git clone "file://$(pwd)/.git" cloned &&
|
git clone "file://$(pwd)/.git" cloned &&
|
||||||
(git rev-parse HEAD; git ls-files -s) >expected &&
|
(git rev-parse HEAD && git ls-files -s) >expected &&
|
||||||
(
|
(
|
||||||
cd cloned &&
|
cd cloned &&
|
||||||
(git rev-parse HEAD; git ls-files -s) >../actual
|
(git rev-parse HEAD && git ls-files -s) >../actual
|
||||||
) &&
|
) &&
|
||||||
test_cmp expected actual
|
test_cmp expected actual
|
||||||
'
|
'
|
||||||
|
@ -40,11 +40,11 @@ test_expect_success advance '
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success fetch '
|
test_expect_success fetch '
|
||||||
(git rev-parse HEAD; git ls-files -s) >expected &&
|
(git rev-parse HEAD && git ls-files -s) >expected &&
|
||||||
(
|
(
|
||||||
cd cloned &&
|
cd cloned &&
|
||||||
git pull &&
|
git pull &&
|
||||||
(git rev-parse HEAD; git ls-files -s) >../actual
|
(git rev-parse HEAD && git ls-files -s) >../actual
|
||||||
) &&
|
) &&
|
||||||
test_cmp expected actual
|
test_cmp expected actual
|
||||||
'
|
'
|
||||||
|
|
|
@ -231,9 +231,9 @@ test_expect_success 'timeout if packed-refs.lock exists' '
|
||||||
test_expect_success 'retry acquiring packed-refs.lock' '
|
test_expect_success 'retry acquiring packed-refs.lock' '
|
||||||
LOCK=.git/packed-refs.lock &&
|
LOCK=.git/packed-refs.lock &&
|
||||||
>"$LOCK" &&
|
>"$LOCK" &&
|
||||||
test_when_finished "wait; rm -f $LOCK" &&
|
test_when_finished "wait && rm -f $LOCK" &&
|
||||||
{
|
{
|
||||||
( sleep 1 ; rm -f $LOCK ) &
|
( sleep 1 && rm -f $LOCK ) &
|
||||||
} &&
|
} &&
|
||||||
git -c core.packedrefstimeout=3000 pack-refs --all --prune
|
git -c core.packedrefstimeout=3000 pack-refs --all --prune
|
||||||
'
|
'
|
||||||
|
|
|
@ -914,7 +914,7 @@ test_expect_success 'git notes copy --stdin' '
|
||||||
${indent}
|
${indent}
|
||||||
${indent}yet another note
|
${indent}yet another note
|
||||||
EOF
|
EOF
|
||||||
(echo $(git rev-parse HEAD~3) $(git rev-parse HEAD^); \
|
(echo $(git rev-parse HEAD~3) $(git rev-parse HEAD^) &&
|
||||||
echo $(git rev-parse HEAD~2) $(git rev-parse HEAD)) |
|
echo $(git rev-parse HEAD~2) $(git rev-parse HEAD)) |
|
||||||
git notes copy --stdin &&
|
git notes copy --stdin &&
|
||||||
git log -2 >actual &&
|
git log -2 >actual &&
|
||||||
|
@ -939,7 +939,7 @@ test_expect_success 'git notes copy --for-rewrite (unconfigured)' '
|
||||||
EOF
|
EOF
|
||||||
test_commit 14th &&
|
test_commit 14th &&
|
||||||
test_commit 15th &&
|
test_commit 15th &&
|
||||||
(echo $(git rev-parse HEAD~3) $(git rev-parse HEAD^); \
|
(echo $(git rev-parse HEAD~3) $(git rev-parse HEAD^) &&
|
||||||
echo $(git rev-parse HEAD~2) $(git rev-parse HEAD)) |
|
echo $(git rev-parse HEAD~2) $(git rev-parse HEAD)) |
|
||||||
git notes copy --for-rewrite=foo &&
|
git notes copy --for-rewrite=foo &&
|
||||||
git log -2 >actual &&
|
git log -2 >actual &&
|
||||||
|
@ -972,7 +972,7 @@ test_expect_success 'git notes copy --for-rewrite (enabled)' '
|
||||||
EOF
|
EOF
|
||||||
test_config notes.rewriteMode overwrite &&
|
test_config notes.rewriteMode overwrite &&
|
||||||
test_config notes.rewriteRef "refs/notes/*" &&
|
test_config notes.rewriteRef "refs/notes/*" &&
|
||||||
(echo $(git rev-parse HEAD~3) $(git rev-parse HEAD^); \
|
(echo $(git rev-parse HEAD~3) $(git rev-parse HEAD^) &&
|
||||||
echo $(git rev-parse HEAD~2) $(git rev-parse HEAD)) |
|
echo $(git rev-parse HEAD~2) $(git rev-parse HEAD)) |
|
||||||
git notes copy --for-rewrite=foo &&
|
git notes copy --for-rewrite=foo &&
|
||||||
git log -2 >actual &&
|
git log -2 >actual &&
|
||||||
|
@ -1059,7 +1059,7 @@ test_expect_success 'git notes copy --for-rewrite (append two to one)' '
|
||||||
git notes add -f -m"append 2" HEAD^^ &&
|
git notes add -f -m"append 2" HEAD^^ &&
|
||||||
test_config notes.rewriteMode concatenate &&
|
test_config notes.rewriteMode concatenate &&
|
||||||
test_config notes.rewriteRef "refs/notes/*" &&
|
test_config notes.rewriteRef "refs/notes/*" &&
|
||||||
(echo $(git rev-parse HEAD^) $(git rev-parse HEAD);
|
(echo $(git rev-parse HEAD^) $(git rev-parse HEAD) &&
|
||||||
echo $(git rev-parse HEAD^^) $(git rev-parse HEAD)) |
|
echo $(git rev-parse HEAD^^) $(git rev-parse HEAD)) |
|
||||||
git notes copy --for-rewrite=foo &&
|
git notes copy --for-rewrite=foo &&
|
||||||
git log -1 >actual &&
|
git log -1 >actual &&
|
||||||
|
|
|
@ -200,10 +200,10 @@ test_expect_success 'rebase -q is quiet' '
|
||||||
|
|
||||||
test_expect_success 'Rebase a commit that sprinkles CRs in' '
|
test_expect_success 'Rebase a commit that sprinkles CRs in' '
|
||||||
(
|
(
|
||||||
echo "One"
|
echo "One" &&
|
||||||
echo "TwoQ"
|
echo "TwoQ" &&
|
||||||
echo "Three"
|
echo "Three" &&
|
||||||
echo "FQur"
|
echo "FQur" &&
|
||||||
echo "Five"
|
echo "Five"
|
||||||
) | q_to_cr >CR &&
|
) | q_to_cr >CR &&
|
||||||
git add CR &&
|
git add CR &&
|
||||||
|
|
|
@ -25,7 +25,7 @@ test_expect_success setup '
|
||||||
git commit -a -m"master updates a bit more." &&
|
git commit -a -m"master updates a bit more." &&
|
||||||
|
|
||||||
git checkout side &&
|
git checkout side &&
|
||||||
(echo "0 $T" ; cat original) >renamed &&
|
(echo "0 $T" && cat original) >renamed &&
|
||||||
git add renamed &&
|
git add renamed &&
|
||||||
git update-index --force-remove original &&
|
git update-index --force-remove original &&
|
||||||
git commit -a -m"side renames and edits." &&
|
git commit -a -m"side renames and edits." &&
|
||||||
|
@ -143,7 +143,7 @@ test_expect_success 'rebase -s funny -Xopt' '
|
||||||
git checkout -b test-funny master^ &&
|
git checkout -b test-funny master^ &&
|
||||||
test_commit funny &&
|
test_commit funny &&
|
||||||
(
|
(
|
||||||
PATH=./test-bin:$PATH
|
PATH=./test-bin:$PATH &&
|
||||||
git rebase -s funny -Xopt master
|
git rebase -s funny -Xopt master
|
||||||
) &&
|
) &&
|
||||||
test -f funny.was.run
|
test -f funny.was.run
|
||||||
|
|
|
@ -60,7 +60,7 @@ test_expect_success 'rebase --continue remembers merge strategy and options' '
|
||||||
EOF
|
EOF
|
||||||
chmod +x test-bin/git-merge-funny &&
|
chmod +x test-bin/git-merge-funny &&
|
||||||
(
|
(
|
||||||
PATH=./test-bin:$PATH
|
PATH=./test-bin:$PATH &&
|
||||||
test_must_fail git rebase -s funny -Xopt master topic
|
test_must_fail git rebase -s funny -Xopt master topic
|
||||||
) &&
|
) &&
|
||||||
test -f funny.was.run &&
|
test -f funny.was.run &&
|
||||||
|
@ -68,7 +68,7 @@ test_expect_success 'rebase --continue remembers merge strategy and options' '
|
||||||
echo "Resolved" >F2 &&
|
echo "Resolved" >F2 &&
|
||||||
git add F2 &&
|
git add F2 &&
|
||||||
(
|
(
|
||||||
PATH=./test-bin:$PATH
|
PATH=./test-bin:$PATH &&
|
||||||
git rebase --continue
|
git rebase --continue
|
||||||
) &&
|
) &&
|
||||||
test -f funny.was.run
|
test -f funny.was.run
|
||||||
|
|
|
@ -156,9 +156,9 @@ test_expect_success 'git add with filemode=0, symlinks=0, and unmerged entries'
|
||||||
test_expect_success 'git add with filemode=0, symlinks=0 prefers stage 2 over stage 1' '
|
test_expect_success 'git add with filemode=0, symlinks=0 prefers stage 2 over stage 1' '
|
||||||
git rm --cached -f file symlink &&
|
git rm --cached -f file symlink &&
|
||||||
(
|
(
|
||||||
echo "100644 $(git hash-object -w stage1) 1 file"
|
echo "100644 $(git hash-object -w stage1) 1 file" &&
|
||||||
echo "100755 $(git hash-object -w stage2) 2 file"
|
echo "100755 $(git hash-object -w stage2) 2 file" &&
|
||||||
echo "100644 $(printf 1 | git hash-object -w -t blob --stdin) 1 symlink"
|
echo "100644 $(printf 1 | git hash-object -w -t blob --stdin) 1 symlink" &&
|
||||||
echo "120000 $(printf 2 | git hash-object -w -t blob --stdin) 2 symlink"
|
echo "120000 $(printf 2 | git hash-object -w -t blob --stdin) 2 symlink"
|
||||||
) | git update-index --index-info &&
|
) | git update-index --index-info &&
|
||||||
git config core.filemode 0 &&
|
git config core.filemode 0 &&
|
||||||
|
@ -265,7 +265,7 @@ test_expect_success 'git add to resolve conflicts on otherwise ignored path' '
|
||||||
git reset --hard &&
|
git reset --hard &&
|
||||||
H=$(git rev-parse :1/2/a) &&
|
H=$(git rev-parse :1/2/a) &&
|
||||||
(
|
(
|
||||||
echo "100644 $H 1 track-this"
|
echo "100644 $H 1 track-this" &&
|
||||||
echo "100644 $H 3 track-this"
|
echo "100644 $H 3 track-this"
|
||||||
) | git update-index --index-info &&
|
) | git update-index --index-info &&
|
||||||
echo track-this >>.gitignore &&
|
echo track-this >>.gitignore &&
|
||||||
|
|
Loading…
Reference in New Issue