@matheusbsbs / matheus-bagliano / commits / a48fcd8369
Fork 0

tests: add missing &&

Breaks in a test assertion's && chain can potentially hide failures from earlier commands in the chain. Commands intended to fail should be marked with !, test_must_fail, or test_might_fail. The examples in this patch do not require that. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jonathan Nieder committed Oct 30, 2010 at 20:46 UTC a48fcd836971d065b9bf16b8cd046fd1aff9b279
84 files changed +166 -166
t/annotate-tests.sh
+1 -1
@@ -38,7 +38,7 @@ test_expect_success \
38 'prepare reference tree' \
39 'echo "1A quick brown fox jumps over the" >file &&
40 echo "lazy dog" >>file &&
41 - git add file
41 + git add file &&
42 GIT_AUTHOR_NAME="A" git commit -a -m "Initial."'
43
44 test_expect_success \
t/t0003-attributes.sh
+1 -1
@@ -59,7 +59,7 @@ test_expect_success 'attribute test' '
59
60 test_expect_success 'attribute test: read paths from stdin' '
61
62 - cat <<EOF > expect
62 + cat <<EOF > expect &&
63 f: test: f
64 a/f: test: f
65 a/c/f: test: f
t/t0024-crlf-archive.sh
+2 -2
@@ -7,7 +7,7 @@ UNZIP=${UNZIP:-unzip}
7
8 test_expect_success setup '
9
10 - git config core.autocrlf true
10 + git config core.autocrlf true &&
11
12 printf "CRLF line ending\r\nAnd another\r\n" > sample &&
13 git add sample &&
@@ -20,7 +20,7 @@ test_expect_success setup '
20 test_expect_success 'tar archive' '
21
22 git archive --format=tar HEAD |
23 - ( mkdir untarred && cd untarred && "$TAR" -xf - )
23 + ( mkdir untarred && cd untarred && "$TAR" -xf - ) &&
24
25 test_cmp sample untarred/sample
26
t/t0026-eol-config.sh
+1 -1
@@ -12,7 +12,7 @@ test_expect_success setup '
12
13 git config core.autocrlf false &&
14
15 - echo "one text" > .gitattributes
15 + echo "one text" > .gitattributes &&
16
17 for w in Hello world how are you; do echo $w; done >one &&
18 for w in I am very very fine thank you; do echo $w; done >two &&
t/t0050-filesystem.sh
+6 -6
@@ -12,14 +12,14 @@ unibad=
12 no_symlinks=
13 test_expect_success 'see what we expect' '
14
15 - test_case=test_expect_success
16 - test_unicode=test_expect_success
15 + test_case=test_expect_success &&
16 + test_unicode=test_expect_success &&
17 mkdir junk &&
18 echo good >junk/CamelCase &&
19 echo bad >junk/camelcase &&
20 if test "$(cat junk/CamelCase)" != good
21 then
22 - test_case=test_expect_failure
22 + test_case=test_expect_failure &&
23 case_insensitive=t
24 fi &&
25 rm -fr junk &&
@@ -27,7 +27,7 @@ test_expect_success 'see what we expect' '
27 >junk/"$auml" &&
28 case "$(cd junk && echo *)" in
29 "$aumlcdiar")
30 - test_unicode=test_expect_failure
30 + test_unicode=test_expect_failure &&
31 unibad=t
32 ;;
33 *) ;;
@@ -36,7 +36,7 @@ test_expect_success 'see what we expect' '
36 {
37 ln -s x y 2> /dev/null &&
38 test -h y 2> /dev/null ||
39 - no_symlinks=1
39 + no_symlinks=1 &&
40 rm -f y
41 }
42 '
@@ -128,7 +128,7 @@ test_expect_success "setup unicode normalization tests" '
128 cd unicode &&
129 touch "$aumlcdiar" &&
130 git add "$aumlcdiar" &&
131 - git commit -m initial
131 + git commit -m initial &&
132 git tag initial &&
133 git checkout -b topic &&
134 git mv $aumlcdiar tmp &&
t/t1000-read-tree-m-3way.sh
+1 -1
@@ -309,7 +309,7 @@ test_expect_success \
309 test_expect_success \
310 '6 - must not exist in O && !A && !B case' "
311 rm -f .git/index DD &&
312 - echo DD >DD
312 + echo DD >DD &&
313 git update-index --add DD &&
314 test_must_fail git read-tree -m $tree_O $tree_A $tree_B
315 "
t/t1001-read-tree-m-2way.sh
+1 -1
@@ -394,7 +394,7 @@ test_expect_success '-m references the correct modified tree' '
394 echo >file-a &&
395 echo >file-b &&
396 git add file-a file-b &&
397 - git commit -a -m "test for correct modified tree"
397 + git commit -a -m "test for correct modified tree" &&
398 git branch initial-mod &&
399 echo b >file-b &&
400 git commit -a -m "B" &&
t/t1011-read-tree-sparse-checkout.sh
+1 -1
@@ -47,7 +47,7 @@ test_expect_success 'read-tree without .git/info/sparse-checkout' '
47 '
48
49 test_expect_success 'read-tree with .git/info/sparse-checkout but disabled' '
50 - echo >.git/info/sparse-checkout
50 + echo >.git/info/sparse-checkout &&
51 git read-tree -m -u HEAD &&
52 git ls-files -t >result &&
53 test_cmp expected.swt result &&
t/t1200-tutorial.sh
+1 -1
@@ -42,7 +42,7 @@ test_expect_success 'git diff' '
42 '
43
44 test_expect_success 'tree' '
45 - tree=$(git write-tree 2>/dev/null)
45 + tree=$(git write-tree 2>/dev/null) &&
46 test 8988da15d077d4829fc51d8544c097def6644dbb = $tree
47 '
48
t/t1302-repo-version.sh
+1 -1
@@ -39,7 +39,7 @@ test_expect_success 'gitdir selection on unsupported repo' '
39 (
40 cd test2 &&
41 git config core.repositoryformatversion >../actual
42 - )
42 + ) &&
43 test_cmp expect actual
44 '
45
t/t1401-symbolic-ref.sh
+1 -1
@@ -28,7 +28,7 @@ test_expect_success 'symbolic-ref refuses non-ref for HEAD' '
28 reset_to_sane
29
30 test_expect_success 'symbolic-ref refuses bare sha1' '
31 - echo content >file && git add file && git commit -m one
31 + echo content >file && git add file && git commit -m one &&
32 test_must_fail git symbolic-ref HEAD `git rev-parse HEAD`
33 '
34 reset_to_sane
t/t1402-check-ref-format.sh
+2 -2
@@ -32,7 +32,7 @@ test_expect_success "check-ref-format --branch @{-1}" '
32 T=$(git write-tree) &&
33 sha1=$(echo A | git commit-tree $T) &&
34 git update-ref refs/heads/master $sha1 &&
35 - git update-ref refs/remotes/origin/master $sha1
35 + git update-ref refs/remotes/origin/master $sha1 &&
36 git checkout master &&
37 git checkout origin/master &&
38 git checkout master &&
@@ -47,7 +47,7 @@ test_expect_success 'check-ref-format --branch from subdir' '
47 T=$(git write-tree) &&
48 sha1=$(echo A | git commit-tree $T) &&
49 git update-ref refs/heads/master $sha1 &&
50 - git update-ref refs/remotes/origin/master $sha1
50 + git update-ref refs/remotes/origin/master $sha1 &&
51 git checkout master &&
52 git checkout origin/master &&
53 git checkout master &&
t/t1410-reflog.sh
+4 -4
@@ -186,8 +186,8 @@ test_expect_success 'delete' '
186 test_tick &&
187 git commit -m tiger C &&
188
189 - HEAD_entry_count=$(git reflog | wc -l)
190 - master_entry_count=$(git reflog show master | wc -l)
189 + HEAD_entry_count=$(git reflog | wc -l) &&
190 + master_entry_count=$(git reflog show master | wc -l) &&
191
192 test $HEAD_entry_count = 5 &&
193 test $master_entry_count = 5 &&
@@ -199,13 +199,13 @@ test_expect_success 'delete' '
199 test $HEAD_entry_count = $(git reflog | wc -l) &&
200 ! grep ox < output &&
201
202 - master_entry_count=$(wc -l < output)
202 + master_entry_count=$(wc -l < output) &&
203
204 git reflog delete HEAD@{1} &&
205 test $(($HEAD_entry_count -1)) = $(git reflog | wc -l) &&
206 test $master_entry_count = $(git reflog show master | wc -l) &&
207
208 - HEAD_entry_count=$(git reflog | wc -l)
208 + HEAD_entry_count=$(git reflog | wc -l) &&
209
210 git reflog delete master@{07.04.2005.15:15:00.-0700} &&
211 git reflog show master > output &&
t/t1450-fsck.sh
+2 -2
@@ -61,7 +61,7 @@ test_expect_success 'object with bad sha1' '
61 sha=$(echo blob | git hash-object -w --stdin) &&
62 old=$(echo $sha | sed "s+^..+&/+") &&
63 new=$(dirname $old)/ffffffffffffffffffffffffffffffffffffff &&
64 - sha="$(dirname $new)$(basename $new)"
64 + sha="$(dirname $new)$(basename $new)" &&
65 mv .git/objects/$old .git/objects/$new &&
66 test_when_finished "remove_object $sha" &&
67 git update-index --add --cacheinfo 100644 $sha foo &&
@@ -111,7 +111,7 @@ test_expect_success 'email with embedded > is not okay' '
111 '
112
113 test_expect_success 'tag pointing to nonexistent' '
114 - cat >invalid-tag <<-\EOF
114 + cat >invalid-tag <<-\EOF &&
115 object ffffffffffffffffffffffffffffffffffffffff
116 type commit
117 tag invalid
t/t2007-checkout-symlink.sh
+1 -1
@@ -17,7 +17,7 @@ test_expect_success SYMLINKS setup '
17 git branch side &&
18
19 echo goodbye >nitfol &&
20 - git add nitfol
20 + git add nitfol &&
21 test_tick &&
22 git commit -m "master adds file nitfol" &&
23
t/t2016-checkout-patch.sh
+1 -1
@@ -32,7 +32,7 @@ test_expect_success PERL 'git checkout -p' '
32 '
33
34 test_expect_success PERL 'git checkout -p with staged changes' '
35 - set_state dir/foo work index
35 + set_state dir/foo work index &&
36 (echo n; echo y) | git checkout -p &&
37 verify_saved_state bar &&
38 verify_state dir/foo index index
t/t2017-checkout-orphan.sh
+1 -1
@@ -14,7 +14,7 @@ TEST_FILE=foo
14 test_expect_success 'Setup' '
15 echo "Initial" >"$TEST_FILE" &&
16 git add "$TEST_FILE" &&
17 - git commit -m "First Commit"
17 + git commit -m "First Commit" &&
18 test_tick &&
19 echo "State 1" >>"$TEST_FILE" &&
20 git add "$TEST_FILE" &&
t/t2050-git-dir-relative.sh
+2 -2
@@ -26,7 +26,7 @@ chmod +x .git/hooks/post-commit'
26
27 test_expect_success 'post-commit hook used ordinarily' '
28 echo initial >top &&
29 -git add top
29 +git add top &&
30 git commit -m initial &&
31 test -r "${COMMIT_FILE}"
32 '
@@ -45,7 +45,7 @@ test -r "${COMMIT_FILE}"
45 rm -rf "${COMMIT_FILE}"
46
47 test_expect_success 'post-commit-hook from sub dir' '
48 -echo changed again >top
48 +echo changed again >top &&
49 cd subdir &&
50 git --git-dir .git --work-tree .. add ../top &&
51 git --git-dir .git --work-tree .. commit -m subcommit &&
t/t2101-update-index-reupdate.sh
+1 -1
@@ -51,7 +51,7 @@ test_expect_success 'update-index again' \
51 echo hello world >dir1/file3 &&
52 echo goodbye people >file2 &&
53 git update-index --add file2 dir1/file3 &&
54 - echo hello everybody >file2
54 + echo hello everybody >file2 &&
55 echo happy >dir1/file3 &&
56 git update-index --again &&
57 git ls-files -s >current &&
t/t2200-add-update.sh
+1 -1
@@ -25,7 +25,7 @@ test_expect_success setup '
25 echo initial >dir1/sub2 &&
26 echo initial >dir2/sub3 &&
27 git add check dir1 dir2 top foo &&
28 - test_tick
28 + test_tick &&
29 git commit -m initial &&
30
31 echo changed >check &&
t/t3001-ls-files-others-exclude.sh
+1 -1
@@ -156,7 +156,7 @@ test_expect_success 'trailing slash in exclude allows directory match (2)' '
156
157 test_expect_success 'trailing slash in exclude forces directory match (1)' '
158
159 - >two
159 + >two &&
160 git ls-files --others --exclude=two/ >output &&
161 grep "^two" output
162
t/t3030-merge-recursive.sh
+1 -1
@@ -544,7 +544,7 @@ test_expect_success 'reset and bind merge' '
544 echo "100644 $o0 0 c"
545 echo "100644 $o1 0 d/e"
546 ) >expected &&
547 - test_cmp expected actual
547 + test_cmp expected actual &&
548
549 git read-tree --prefix=z/ master &&
550 git ls-files -s >actual &&
t/t3050-subprojects-fetch.sh
+2 -2
@@ -10,10 +10,10 @@ test_expect_success setup '
10 cd sub &&
11 git init &&
12 >subfile &&
13 - git add subfile
13 + git add subfile &&
14 git commit -m "subproject commit #1"
15 ) &&
16 - >mainfile
16 + >mainfile &&
17 git add sub mainfile &&
18 test_tick &&
19 git commit -m "superproject commit #1"
t/t3203-branch-output.sh
+3 -3
@@ -12,13 +12,13 @@ test_expect_success 'make commits' '
12 '
13
14 test_expect_success 'make branches' '
15 - git branch branch-one
15 + git branch branch-one &&
16 git branch branch-two HEAD^
17 '
18
19 test_expect_success 'make remote branches' '
20 - git update-ref refs/remotes/origin/branch-one branch-one
21 - git update-ref refs/remotes/origin/branch-two branch-two
20 + git update-ref refs/remotes/origin/branch-one branch-one &&
21 + git update-ref refs/remotes/origin/branch-two branch-two &&
22 git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/branch-one
23 '
24
t/t3300-funny-names.sh
+4 -4
@@ -43,8 +43,8 @@ test_expect_success TABS_IN_FILENAMES 'git ls-files no-funny' \
43 test_cmp expected current'
44
45 test_expect_success TABS_IN_FILENAMES 'setup expect' '
46 -t0=`git write-tree`
47 -echo "$t0" >t0
46 +t0=`git write-tree` &&
47 +echo "$t0" >t0 &&
48
49 cat > expected <<\EOF
50 just space
@@ -69,8 +69,8 @@ test_expect_success TABS_IN_FILENAMES 'git ls-files -z with-funny' \
69 test_cmp expected current'
70
71 test_expect_success TABS_IN_FILENAMES 'setup expect' '
72 -t1=`git write-tree`
73 -echo "$t1" >t1
72 +t1=`git write-tree` &&
73 +echo "$t1" >t1 &&
74
75 cat > expected <<\EOF
76 just space
t/t3307-notes-man.sh
+1 -1
@@ -26,7 +26,7 @@ test_expect_success 'example 1: notes to add an Acked-by line' '
26 '
27
28 test_expect_success 'example 2: binary notes' '
29 - cp "$TEST_DIRECTORY"/test4012.png .
29 + cp "$TEST_DIRECTORY"/test4012.png . &&
30 git checkout B &&
31 blob=$(git hash-object -w test4012.png) &&
32 git notes --ref=logo add -C "$blob" &&
t/t3406-rebase-message.sh
+3 -3
@@ -43,20 +43,20 @@ test_expect_success 'rebase -m' '
43 '
44
45 test_expect_success 'rebase --stat' '
46 - git reset --hard start
46 + git reset --hard start &&
47 git rebase --stat master >diffstat.txt &&
48 grep "^ fileX | *1 +$" diffstat.txt
49 '
50
51 test_expect_success 'rebase w/config rebase.stat' '
52 - git reset --hard start
52 + git reset --hard start &&
53 git config rebase.stat true &&
54 git rebase master >diffstat.txt &&
55 grep "^ fileX | *1 +$" diffstat.txt
56 '
57
58 test_expect_success 'rebase -n overrides config rebase.stat config' '
59 - git reset --hard start
59 + git reset --hard start &&
60 git config rebase.stat true &&
61 git rebase -n master >diffstat.txt &&
62 ! grep "^ fileX | *1 +$" diffstat.txt
t/t3408-rebase-multi-line.sh
+1 -1
@@ -16,7 +16,7 @@ test_expect_success setup '
16 git commit -a -m "A sample commit log message that has a long
17 summary that spills over multiple lines.
18
19 -But otherwise with a sane description."
19 +But otherwise with a sane description." &&
20
21 git branch side &&
22
t/t3412-rebase-root.sh
+2 -2
@@ -173,14 +173,14 @@ EOF
173 test_expect_success 'pre-rebase hook stops rebase' '
174 git checkout -b stops1 other &&
175 test_must_fail git rebase --root --onto master &&
176 - test "z$(git symbolic-ref HEAD)" = zrefs/heads/stops1
176 + test "z$(git symbolic-ref HEAD)" = zrefs/heads/stops1 &&
177 test 0 = $(git rev-list other...stops1 | wc -l)
178 '
179
180 test_expect_success 'pre-rebase hook stops rebase -i' '
181 git checkout -b stops2 other &&
182 test_must_fail git rebase --root --onto master &&
183 - test "z$(git symbolic-ref HEAD)" = zrefs/heads/stops2
183 + test "z$(git symbolic-ref HEAD)" = zrefs/heads/stops2 &&
184 test 0 = $(git rev-list other...stops2 | wc -l)
185 '
186
t/t3415-rebase-autosquash.sh
+3 -3
@@ -26,7 +26,7 @@ test_auto_fixup() {
26 echo 1 >file1 &&
27 git add -u &&
28 test_tick &&
29 - git commit -m "fixup! first"
29 + git commit -m "fixup! first" &&
30
31 git tag $1 &&
32 test_tick &&
@@ -55,7 +55,7 @@ test_auto_squash() {
55 echo 1 >file1 &&
56 git add -u &&
57 test_tick &&
58 - git commit -m "squash! first"
58 + git commit -m "squash! first" &&
59
60 git tag $1 &&
61 test_tick &&
@@ -84,7 +84,7 @@ test_expect_success 'misspelled auto squash' '
84 echo 1 >file1 &&
85 git add -u &&
86 test_tick &&
87 - git commit -m "squash! forst"
87 + git commit -m "squash! forst" &&
88 git tag final-missquash &&
89 test_tick &&
90 git rebase --autosquash -i HEAD^^^ &&
t/t3417-rebase-whitespace-fix.sh
+1 -1
@@ -89,7 +89,7 @@ test_expect_success 'same, but do not remove trailing spaces' '
89 git config core.whitespace "-blank-at-eol" &&
90 git reset --hard HEAD^ &&
91 cp third file && git add file && git commit -m third &&
92 - git rebase --whitespace=fix HEAD^^
92 + git rebase --whitespace=fix HEAD^^ &&
93 git diff --exit-code HEAD^:file expect-second &&
94 test_cmp file third
95 '
t/t3504-cherry-pick-rerere.sh
+2 -2
@@ -23,7 +23,7 @@ test_expect_success 'conflicting merge' '
23 test_expect_success 'fixup' '
24 echo foo-dev >foo &&
25 git add foo && test_tick && git commit -q -m 4 &&
26 - git reset --hard HEAD^
26 + git reset --hard HEAD^ &&
27 echo foo-dev >expect
28 '
29
@@ -33,7 +33,7 @@ test_expect_success 'cherry-pick conflict' '
33 '
34
35 test_expect_success 'reconfigure' '
36 - git config rerere.enabled false
36 + git config rerere.enabled false &&
37 git reset --hard
38 '
39
t/t3902-quoted.sh
+3 -3
@@ -36,19 +36,19 @@ for_each_name () {
36 test_expect_success TABS_IN_FILENAMES 'setup' '
37
38 mkdir "$FN" &&
39 - for_each_name "echo initial >\"\$name\""
39 + for_each_name "echo initial >\"\$name\"" &&
40 git add . &&
41 git commit -q -m Initial &&
42
43 for_each_name "echo second >\"\$name\"" &&
44 - git commit -a -m Second
44 + git commit -a -m Second &&
45
46 for_each_name "echo modified >\"\$name\""
47
48 '
49
50 test_expect_success TABS_IN_FILENAMES 'setup expected files' '
51 -cat >expect.quoted <<\EOF
51 +cat >expect.quoted <<\EOF &&
52 Name
53 "Name and a\nLF"
54 "Name and an\tHT"
t/t3903-stash.sh
+3 -3
@@ -157,7 +157,7 @@ EOF
157
158 test_expect_success 'stash branch' '
159 echo foo > file &&
160 - git commit file -m first
160 + git commit file -m first &&
161 echo bar > file &&
162 echo bar2 > file2 &&
163 git add file2 &&
@@ -255,7 +255,7 @@ test_expect_success 'stash rm and ignore' '
255 echo file >.gitignore &&
256 git stash save "rm and ignore" &&
257 test bar = "$(cat file)" &&
258 - test file = "$(cat .gitignore)"
258 + test file = "$(cat .gitignore)" &&
259 git stash apply &&
260 ! test -r file &&
261 test file = "$(cat .gitignore)"
@@ -268,7 +268,7 @@ test_expect_success 'stash rm and ignore (stage .gitignore)' '
268 git add .gitignore &&
269 git stash save "rm and ignore (stage .gitignore)" &&
270 test bar = "$(cat file)" &&
271 - ! test -r .gitignore
271 + ! test -r .gitignore &&
272 git stash apply &&
273 ! test -r file &&
274 test file = "$(cat .gitignore)"
t/t3904-stash-patch.sh
+1 -1
@@ -20,7 +20,7 @@ test_expect_success PERL 'setup' '
20 # note: bar sorts before dir, so the first 'n' is always to skip 'bar'
21
22 test_expect_success PERL 'saying "n" does nothing' '
23 - set_state dir/foo work index
23 + set_state dir/foo work index &&
24 (echo n; echo n) | test_must_fail git stash save -p &&
25 verify_state dir/foo work index &&
26 verify_saved_state bar
t/t4008-diff-break-rewrite.sh
+1 -1
@@ -155,7 +155,7 @@ test_expect_success \
155 git checkout-index -f -u -a &&
156 sed -e "s/git/GIT/" file0 >file1 &&
157 sed -e "s/git/GET/" file0 >file2 &&
158 - rm -f file0
158 + rm -f file0 &&
159 git update-index --add --remove file0 file1 file2'
160
161 test_expect_success \
t/t4015-diff-whitespace.sh
+1 -1
@@ -330,7 +330,7 @@ test_expect_success 'check space before tab in indent (space-before-tab: on)' '
330
331 test_expect_success 'check spaces as indentation (indent-with-non-tab: off)' '
332
333 - git config core.whitespace "-indent-with-non-tab"
333 + git config core.whitespace "-indent-with-non-tab" &&
334 echo " foo ();" > x &&
335 git diff --check
336
t/t4021-format-patch-numbered.sh
+1 -1
@@ -95,7 +95,7 @@ test_expect_success 'format.numbered && --keep-subject' '
95
96 test_expect_success 'format.numbered = auto' '
97
98 - git config format.numbered auto
98 + git config format.numbered auto &&
99 git format-patch --stdout HEAD~2 > patch5 &&
100 test_numbered patch5
101
t/t4027-diff-submodule.sh
+4 -4
@@ -316,11 +316,11 @@ test_expect_success 'git diff (empty submodule dir)' '
316 test_expect_success 'conflicted submodule setup' '
317
318 # 39 efs
319 - c=fffffffffffffffffffffffffffffffffffffff
319 + c=fffffffffffffffffffffffffffffffffffffff &&
320 (
321 - echo "000000 $_z40 0 sub"
322 - echo "160000 1$c 1 sub"
323 - echo "160000 2$c 2 sub"
321 + echo "000000 $_z40 0 sub" &&
322 + echo "160000 1$c 1 sub" &&
323 + echo "160000 2$c 2 sub" &&
324 echo "160000 3$c 3 sub"
325 ) | git update-index --index-info &&
326 echo >expect.nosub '\''diff --cc sub
t/t4034-diff-words.sh
+2 -2
@@ -6,8 +6,8 @@ test_description='word diff colors'
6
7 test_expect_success setup '
8
9 - git config diff.color.old red
10 - git config diff.color.new green
9 + git config diff.color.old red &&
10 + git config diff.color.new green &&
11 git config diff.color.func magenta
12
13 '
t/t4103-apply-binary.sh
+4 -4
@@ -41,11 +41,11 @@ test_expect_success 'setup' "
41 "
42
43 test_expect_success 'stat binary diff -- should not fail.' \
44 - 'git checkout master
44 + 'git checkout master &&
45 git apply --stat --summary B.diff'
46
47 test_expect_success 'stat binary diff (copy) -- should not fail.' \
48 - 'git checkout master
48 + 'git checkout master &&
49 git apply --stat --summary C.diff'
50
51 test_expect_success 'check binary diff -- should fail.' \
@@ -69,11 +69,11 @@ test_expect_success \
69 '
70
71 test_expect_success 'check binary diff with replacement.' \
72 - 'git checkout master
72 + 'git checkout master &&
73 git apply --check --allow-binary-replacement BF.diff'
74
75 test_expect_success 'check binary diff with replacement (copy).' \
76 - 'git checkout master
76 + 'git checkout master &&
77 git apply --check --allow-binary-replacement CF.diff'
78
79 # Now we start applying them.
t/t4111-apply-subdir.sh
+2 -2
@@ -89,7 +89,7 @@ test_expect_success 'apply --index from subdir of toplevel' '
89 test_expect_success 'apply from .git dir' '
90 cp postimage expected &&
91 cp preimage .git/file &&
92 - cp preimage .git/objects/file
92 + cp preimage .git/objects/file &&
93 (
94 cd .git &&
95 git apply "$patch"
@@ -100,7 +100,7 @@ test_expect_success 'apply from .git dir' '
100 test_expect_success 'apply from subdir of .git dir' '
101 cp postimage expected &&
102 cp preimage .git/file &&
103 - cp preimage .git/objects/file
103 + cp preimage .git/objects/file &&
104 (
105 cd .git/objects &&
106 git apply "$patch"
t/t4119-apply-config.sh
+1 -1
@@ -73,7 +73,7 @@ D=`pwd`
73 test_expect_success 'apply --whitespace=strip in subdir' '
74
75 cd "$D" &&
76 - git config --unset-all apply.whitespace
76 + git config --unset-all apply.whitespace &&
77 rm -f sub/file1 &&
78 cp saved sub/file1 &&
79 git update-index --refresh &&
t/t4127-apply-same-fn.sh
+9 -9
@@ -31,7 +31,7 @@ test_expect_success 'apply same filename with independent changes' '
31 '
32
33 test_expect_success 'apply same filename with overlapping changes' '
34 - git reset --hard
34 + git reset --hard &&
35 modify "s/^d/z/" same_fn &&
36 git diff > patch0 &&
37 git add same_fn &&
@@ -44,8 +44,8 @@ test_expect_success 'apply same filename with overlapping changes' '
44 '
45
46 test_expect_success 'apply same new filename after rename' '
47 - git reset --hard
48 - git mv same_fn new_fn
47 + git reset --hard &&
48 + git mv same_fn new_fn &&
49 modify "s/^d/z/" new_fn &&
50 git add new_fn &&
51 git diff -M --cached > patch1 &&
@@ -58,12 +58,12 @@ test_expect_success 'apply same new filename after rename' '
58 '
59
60 test_expect_success 'apply same old filename after rename -- should fail.' '
61 - git reset --hard
62 - git mv same_fn new_fn
61 + git reset --hard &&
62 + git mv same_fn new_fn &&
63 modify "s/^d/z/" new_fn &&
64 git add new_fn &&
65 git diff -M --cached > patch1 &&
66 - git mv new_fn same_fn
66 + git mv new_fn same_fn &&
67 modify "s/^e/y/" same_fn &&
68 git diff >> patch1 &&
69 git reset --hard &&
@@ -71,13 +71,13 @@ test_expect_success 'apply same old filename after rename -- should fail.' '
71 '
72
73 test_expect_success 'apply A->B (rename), C->A (rename), A->A -- should pass.' '
74 - git reset --hard
75 - git mv same_fn new_fn
74 + git reset --hard &&
75 + git mv same_fn new_fn &&
76 modify "s/^d/z/" new_fn &&
77 git add new_fn &&
78 git diff -M --cached > patch1 &&
79 git commit -m "a rename" &&
80 - git mv other_fn same_fn
80 + git mv other_fn same_fn &&
81 modify "s/^e/y/" same_fn &&
82 git add same_fn &&
83 git diff -M --cached >> patch1 &&
t/t4130-apply-criss-cross-rename.sh
+1 -1
@@ -44,7 +44,7 @@ test_expect_success 'criss-cross rename' '
44 git reset --hard &&
45 mv file1 tmp &&
46 mv file2 file1 &&
47 - mv file3 file2
47 + mv file3 file2 &&
48 mv tmp file3 &&
49 cp file1 file1-swapped &&
50 cp file2 file2-swapped &&
t/t4133-apply-filenames.sh
+4 -4
@@ -8,7 +8,7 @@ test_description='git apply filename consistency check'
8 . ./test-lib.sh
9
10 test_expect_success setup '
11 - cat > bad1.patch <<EOF
11 + cat > bad1.patch <<EOF &&
12 diff --git a/f b/f
13 new file mode 100644
14 index 0000000..d00491f
@@ -29,9 +29,9 @@ EOF
29 '
30
31 test_expect_success 'apply diff with inconsistent filenames in headers' '
32 - test_must_fail git apply bad1.patch 2>err
33 - grep "inconsistent new filename" err
34 - test_must_fail git apply bad2.patch 2>err
32 + test_must_fail git apply bad1.patch 2>err &&
33 + grep "inconsistent new filename" err &&
34 + test_must_fail git apply bad2.patch 2>err &&
35 grep "inconsistent old filename" err
36 '
37
t/t4134-apply-submodule.sh
+1 -1
@@ -8,7 +8,7 @@ test_description='git apply submodule tests'
8 . ./test-lib.sh
9
10 test_expect_success setup '
11 - cat > create-sm.patch <<EOF
11 + cat > create-sm.patch <<EOF &&
12 diff --git a/dir/sm b/dir/sm
13 new file mode 160000
14 index 0000000..0123456
t/t4150-am.sh
+1 -1
@@ -219,7 +219,7 @@ test_expect_success 'am stays in branch' '
219
220 test_expect_success 'am --signoff does not add Signed-off-by: line if already there' '
221 git format-patch --stdout HEAD^ >patch3 &&
222 - sed -e "/^Subject/ s,\[PATCH,Re: Re: Re: & 1/5 v2," patch3 >patch4
222 + sed -e "/^Subject/ s,\[PATCH,Re: Re: Re: & 1/5 v2," patch3 >patch4 &&
223 rm -fr .git/rebase-apply &&
224 git reset --hard &&
225 git checkout HEAD^ &&
t/t4201-shortlog.sh
+1 -1
@@ -35,7 +35,7 @@ test_expect_success 'setup' '
35 tr 1234 "\370\235\204\236")" a1 &&
36
37 echo 5 >a1 &&
38 - git commit --quiet -m "a 12 34 56 78" a1
38 + git commit --quiet -m "a 12 34 56 78" a1 &&
39
40 echo 6 >a1 &&
41 git commit --quiet -m "Commit by someone else" \
t/t4202-log.sh
+2 -2
@@ -191,7 +191,7 @@ test_expect_success 'git show <commits> leaves list of commits as given' '
191 test_expect_success 'setup case sensitivity tests' '
192 echo case >one &&
193 test_tick &&
194 - git add one
194 + git add one &&
195 git commit -a -m Second
196 '
197
@@ -341,7 +341,7 @@ test_expect_success 'set up more tangled history' '
341 test_commit octopus-b &&
342 git checkout master &&
343 test_commit seventh &&
344 - git merge octopus-a octopus-b
344 + git merge octopus-a octopus-b &&
345 git merge reach
346 '
347
t/t4252-am-options.sh
+1 -1
@@ -59,7 +59,7 @@ test_expect_success 'interrupted am --directory="frotz nitfol"' '
59 '
60
61 test_expect_success 'apply to a funny path' '
62 - with_sq="with'\''sq"
62 + with_sq="with'\''sq" &&
63 rm -fr .git/rebase-apply &&
64 git reset --hard initial &&
65 git am --directory="$with_sq" "$tm"/am-test-5-2 &&
t/t5300-pack-object.sh
+1 -1
@@ -12,7 +12,7 @@ TRASH=`pwd`
12
13 test_expect_success \
14 'setup' \
15 - 'rm -f .git/index*
15 + 'rm -f .git/index* &&
16 perl -e "print \"a\" x 4096;" > a &&
17 perl -e "print \"b\" x 4096;" > b &&
18 perl -e "print \"c\" x 4096;" > c &&
t/t5301-sliding-window.sh
+2 -2
@@ -8,7 +8,7 @@ test_description='mmap sliding window tests'
8
9 test_expect_success \
10 'setup' \
11 - 'rm -f .git/index*
11 + 'rm -f .git/index* &&
12 for i in a b c
13 do
14 echo $i >$i &&
@@ -48,7 +48,7 @@ test_expect_success \
48 git repack -a -d &&
49 test "`git count-objects`" = "0 objects, 0 kilobytes" &&
50 pack2=`ls .git/objects/pack/*.pack` &&
51 - test -f "$pack2"
51 + test -f "$pack2" &&
52 test "$pack1" \!= "$pack2"'
53
54 test_expect_success \
t/t5302-pack-index.sh
+1 -1
@@ -8,7 +8,7 @@ test_description='pack index with 64-bit offsets and object CRC'
8
9 test_expect_success \
10 'setup' \
11 - 'rm -rf .git
11 + 'rm -rf .git &&
12 git init &&
13 git config pack.threads 1 &&
14 i=1 &&
t/t5500-fetch-pack.sh
+1 -1
@@ -91,7 +91,7 @@ test_expect_success 'setup' '
91 prev=$cur &&
92 cur=$(($cur+1))
93 done &&
94 - add B1 $A1
94 + add B1 $A1 &&
95 echo $ATIP > .git/refs/heads/A &&
96 echo $BTIP > .git/refs/heads/B &&
97 git symbolic-ref HEAD refs/heads/B
t/t5502-quickfetch.sh
+1 -1
@@ -57,7 +57,7 @@ test_expect_success 'copy commit and tree but not blob by hand' '
57 cd cloned &&
58 git count-objects | sed -e "s/ *objects,.*//"
59 ) ) &&
60 - test $cnt -eq 6
60 + test $cnt -eq 6 &&
61
62 blob=$(git rev-parse HEAD:file | sed -e "s|..|&/|") &&
63 test -f "cloned/.git/objects/$blob" &&
t/t5510-fetch.sh
+1 -1
@@ -119,7 +119,7 @@ test_expect_success 'fetch must not resolve short tag name' '
119 test_expect_success 'fetch must not resolve short remote name' '
120
121 cd "$D" &&
122 - git update-ref refs/remotes/six/HEAD HEAD
122 + git update-ref refs/remotes/six/HEAD HEAD &&
123
124 mkdir six &&
125 cd six &&
t/t5514-fetch-multiple.sh
+1 -1
@@ -27,7 +27,7 @@ test_expect_success setup '
27 (
28 cd two && git branch another
29 ) &&
30 - git clone --mirror two three
30 + git clone --mirror two three &&
31 git clone one test
32 '
33
t/t5516-fetch-push.sh
+4 -4
@@ -586,7 +586,7 @@ test_expect_success 'push --delete refuses src:dest refspecs' '
586 '
587
588 test_expect_success 'warn on push to HEAD of non-bare repository' '
589 - mk_test heads/master
589 + mk_test heads/master &&
590 (
591 cd testrepo &&
592 git checkout master &&
@@ -597,7 +597,7 @@ test_expect_success 'warn on push to HEAD of non-bare repository' '
597 '
598
599 test_expect_success 'deny push to HEAD of non-bare repository' '
600 - mk_test heads/master
600 + mk_test heads/master &&
601 (
602 cd testrepo &&
603 git checkout master &&
@@ -607,7 +607,7 @@ test_expect_success 'deny push to HEAD of non-bare repository' '
607 '
608
609 test_expect_success 'allow push to HEAD of bare repository (bare)' '
610 - mk_test heads/master
610 + mk_test heads/master &&
611 (
612 cd testrepo &&
613 git checkout master &&
@@ -619,7 +619,7 @@ test_expect_success 'allow push to HEAD of bare repository (bare)' '
619 '
620
621 test_expect_success 'allow push to HEAD of non-bare repository (config)' '
622 - mk_test heads/master
622 + mk_test heads/master &&
623 (
624 cd testrepo &&
625 git checkout master &&
t/t5519-push-alternates.sh
+1 -1
@@ -123,7 +123,7 @@ test_expect_success 'bob works and pushes again' '
123 (
124 cd alice-pub &&
125 git cat-file commit master >../bob-work/commit
126 - )
126 + ) &&
127 (
128 # This time Bob does not pull from Alice, and
129 # the master branch at her public repository points
t/t5531-deep-submodule-push.sh
+1 -1
@@ -6,7 +6,7 @@ test_description='unpack-objects'
6
7 test_expect_success setup '
8 mkdir pub.git &&
9 - GIT_DIR=pub.git git init --bare
9 + GIT_DIR=pub.git git init --bare &&
10 GIT_DIR=pub.git git config receive.fsckobjects true &&
11 mkdir work &&
12 (
t/t556x_common
+12 -12
@@ -52,21 +52,21 @@ get_static_files() {
52 SMART=smart
53 export GIT_HTTP_EXPORT_ALL=1
54 test_expect_success 'direct refs/heads/master not found' '
55 - log_div "refs/heads/master"
55 + log_div "refs/heads/master" &&
56 GET refs/heads/master "404 Not Found"
57 '
58 test_expect_success 'static file is ok' '
59 - log_div "getanyfile default"
59 + log_div "getanyfile default" &&
60 get_static_files "200 OK"
61 '
62 SMART=smart_noexport
63 unset GIT_HTTP_EXPORT_ALL
64 test_expect_success 'no export by default' '
65 - log_div "no git-daemon-export-ok"
65 + log_div "no git-daemon-export-ok" &&
66 get_static_files "404 Not Found"
67 '
68 test_expect_success 'export if git-daemon-export-ok' '
69 - log_div "git-daemon-export-ok"
69 + log_div "git-daemon-export-ok" &&
70 (cd "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
71 touch git-daemon-export-ok
72 ) &&
@@ -75,47 +75,47 @@ test_expect_success 'export if git-daemon-export-ok' '
75 SMART=smart
76 export GIT_HTTP_EXPORT_ALL=1
77 test_expect_success 'static file if http.getanyfile true is ok' '
78 - log_div "getanyfile true"
78 + log_div "getanyfile true" &&
79 config http.getanyfile true &&
80 get_static_files "200 OK"
81 '
82 test_expect_success 'static file if http.getanyfile false fails' '
83 - log_div "getanyfile false"
83 + log_div "getanyfile false" &&
84 config http.getanyfile false &&
85 get_static_files "403 Forbidden"
86 '
87
88 test_expect_success 'http.uploadpack default enabled' '
89 - log_div "uploadpack default"
89 + log_div "uploadpack default" &&
90 GET info/refs?service=git-upload-pack "200 OK" &&
91 POST git-upload-pack 0000 "200 OK"
92 '
93 test_expect_success 'http.uploadpack true' '
94 - log_div "uploadpack true"
94 + log_div "uploadpack true" &&
95 config http.uploadpack true &&
96 GET info/refs?service=git-upload-pack "200 OK" &&
97 POST git-upload-pack 0000 "200 OK"
98 '
99 test_expect_success 'http.uploadpack false' '
100 - log_div "uploadpack false"
100 + log_div "uploadpack false" &&
101 config http.uploadpack false &&
102 GET info/refs?service=git-upload-pack "403 Forbidden" &&
103 POST git-upload-pack 0000 "403 Forbidden"
104 '
105
106 test_expect_success 'http.receivepack default disabled' '
107 - log_div "receivepack default"
107 + log_div "receivepack default" &&
108 GET info/refs?service=git-receive-pack "403 Forbidden" &&
109 POST git-receive-pack 0000 "403 Forbidden"
110 '
111 test_expect_success 'http.receivepack true' '
112 - log_div "receivepack true"
112 + log_div "receivepack true" &&
113 config http.receivepack true &&
114 GET info/refs?service=git-receive-pack "200 OK" &&
115 POST git-receive-pack 0000 "200 OK"
116 '
117 test_expect_success 'http.receivepack false' '
118 - log_div "receivepack false"
118 + log_div "receivepack false" &&
119 config http.receivepack false &&
120 GET info/refs?service=git-receive-pack "403 Forbidden" &&
121 POST git-receive-pack 0000 "403 Forbidden"
t/t6001-rev-list-graft.sh
+4 -4
@@ -90,22 +90,22 @@ check () {
90 for type in basic parents parents-raw
91 do
92 test_expect_success 'without grafts' "
93 - rm -f .git/info/grafts
93 + rm -f .git/info/grafts &&
94 check $type $B2 -- $B2 $B1 $B0
95 "
96
97 test_expect_success 'with grafts' "
98 - echo '$B0 $A2' >.git/info/grafts
98 + echo '$B0 $A2' >.git/info/grafts &&
99 check $type $B2 -- $B2 $B1 $B0 $A2 $A1 $A0
100 "
101
102 test_expect_success 'without grafts, with pathlimit' "
103 - rm -f .git/info/grafts
103 + rm -f .git/info/grafts &&
104 check $type $B2 subdir -- $B2 $B0
105 "
106
107 test_expect_success 'with grafts, with pathlimit' "
108 - echo '$B0 $A2' >.git/info/grafts
108 + echo '$B0 $A2' >.git/info/grafts &&
109 check $type $B2 subdir -- $B2 $B0 $A2 $A0
110 "
111
t/t6009-rev-list-parent.sh
+1 -1
@@ -18,7 +18,7 @@ test_expect_success setup '
18
19 commit one &&
20
21 - test_tick=$(($test_tick - 2400))
21 + test_tick=$(($test_tick - 2400)) &&
22
23 commit two &&
24 commit three &&
t/t6010-merge-base.sh
+1 -1
@@ -131,7 +131,7 @@ test_expect_success 'unsynchronized clocks' '
131 R2=$(doit 3 R2 $R1) &&
132
133 PL=$(doit 4 PL $L2 $C2) &&
134 - PR=$(doit 4 PR $C2 $R2)
134 + PR=$(doit 4 PR $C2 $R2) &&
135
136 git name-rev $C2 >expected &&
137
t/t6024-recursive-merge.sh
+1 -1
@@ -104,7 +104,7 @@ test_expect_success 'mark rename/delete as unmerged' '
104 test_tick &&
105 git commit -m delete &&
106 git checkout -b rename HEAD^ &&
107 - git mv a1 a2
107 + git mv a1 a2 &&
108 test_tick &&
109 git commit -m rename &&
110 test_must_fail git merge delete &&
t/t6029-merge-subtree.sh
+1 -1
@@ -6,7 +6,7 @@ test_description='subtree merge strategy'
6
7 test_expect_success setup '
8
9 - s="1 2 3 4 5 6 7 8"
9 + s="1 2 3 4 5 6 7 8" &&
10 for i in $s; do echo $i; done >hello &&
11 git add hello &&
12 git commit -m initial &&
t/t6030-bisect-porcelain.sh
+4 -4
@@ -517,13 +517,13 @@ test_expect_success '"parallel" side branch creation' '
517 add_line_into_file "2(para): line 2 on parallel branch" dir2/file2 &&
518 PARA_HASH2=$(git rev-parse --verify HEAD) &&
519 add_line_into_file "3(para): line 3 on parallel branch" dir2/file3 &&
520 - PARA_HASH3=$(git rev-parse --verify HEAD)
520 + PARA_HASH3=$(git rev-parse --verify HEAD) &&
521 git merge -m "merge HASH4 and PARA_HASH3" "$HASH4" &&
522 - PARA_HASH4=$(git rev-parse --verify HEAD)
522 + PARA_HASH4=$(git rev-parse --verify HEAD) &&
523 add_line_into_file "5(para): add line on parallel branch" dir1/file1 &&
524 - PARA_HASH5=$(git rev-parse --verify HEAD)
524 + PARA_HASH5=$(git rev-parse --verify HEAD) &&
525 add_line_into_file "6(para): add line on parallel branch" dir2/file2 &&
526 - PARA_HASH6=$(git rev-parse --verify HEAD)
526 + PARA_HASH6=$(git rev-parse --verify HEAD) &&
527 git merge -m "merge HASH7 and PARA_HASH6" "$HASH7" &&
528 PARA_HASH7=$(git rev-parse --verify HEAD)
529 '
t/t6036-recursive-corner-cases.sh
+1 -1
@@ -15,7 +15,7 @@ test_description='recursive merge corner cases'
15 #
16
17 test_expect_success setup '
18 - ten="0 1 2 3 4 5 6 7 8 9"
18 + ten="0 1 2 3 4 5 6 7 8 9" &&
19 for i in $ten
20 do
21 echo line $i in a sample file
t/t6040-tracking-info.sh
+1 -1
@@ -60,7 +60,7 @@ test_expect_success 'checkout' '
60
61 test_expect_success 'checkout with local tracked branch' '
62 git checkout master &&
63 - git checkout follower >actual
63 + git checkout follower >actual &&
64 grep "is ahead of" actual
65 '
66
t/t6050-replace.sh
+1 -1
@@ -53,7 +53,7 @@ test_expect_success 'set up buggy branch' '
53 echo "line 12" >> hello &&
54 echo "line 13" >> hello &&
55 add_and_commit_file hello "2 more lines" &&
56 - HASH6=$(git rev-parse --verify HEAD)
56 + HASH6=$(git rev-parse --verify HEAD) &&
57 echo "line 14" >> hello &&
58 echo "line 15" >> hello &&
59 echo "line 16" >> hello &&
t/t7105-reset-patch.sh
+3 -3
@@ -18,7 +18,7 @@ test_expect_success PERL 'setup' '
18 # note: bar sorts before foo, so the first 'n' is always to skip 'bar'
19
20 test_expect_success PERL 'saying "n" does nothing' '
21 - set_and_save_state dir/foo work work
21 + set_and_save_state dir/foo work work &&
22 (echo n; echo n) | git reset -p &&
23 verify_saved_state dir/foo &&
24 verify_saved_state bar
@@ -42,14 +42,14 @@ test_expect_success PERL 'git reset -p HEAD^' '
42 # the failure case (and thus get out of the loop).
43
44 test_expect_success PERL 'git reset -p dir' '
45 - set_state dir/foo work work
45 + set_state dir/foo work work &&
46 (echo y; echo n) | git reset -p dir &&
47 verify_state dir/foo work head &&
48 verify_saved_state bar
49 '
50
51 test_expect_success PERL 'git reset -p -- foo (inside dir)' '
52 - set_state dir/foo work work
52 + set_state dir/foo work work &&
53 (echo y; echo n) | (cd dir && git reset -p -- foo) &&
54 verify_state dir/foo work head &&
55 verify_saved_state bar
t/t7509-commit.sh
+1 -1
@@ -40,7 +40,7 @@ test_expect_success '-C option copies only the message with --reset-author' '
40 test_tick &&
41 git commit -a -C Initial --reset-author &&
42 echo "author $GIT_AUTHOR_NAME <$GIT_AUTHOR_EMAIL> $GIT_AUTHOR_DATE" >expect &&
43 - author_header HEAD >actual
43 + author_header HEAD >actual &&
44 test_cmp expect actual &&
45
46 message_body Initial >expect &&
t/t7602-merge-octopus-many.sh
+1 -1
@@ -31,7 +31,7 @@ test_expect_success 'merge c1 with c2, c3, c4, ... c29' '
31 do
32 refs="$refs c$i"
33 i=`expr $i + 1`
34 - done
34 + done &&
35 git merge $refs &&
36 test "$(git rev-parse c1)" != "$(git rev-parse HEAD)" &&
37 i=1 &&
t/t7610-mergetool.sh
+1 -1
@@ -54,7 +54,7 @@ test_expect_success 'custom mergetool' '
54
55 test_expect_success 'mergetool crlf' '
56 git config core.autocrlf true &&
57 - git checkout -b test2 branch1
57 + git checkout -b test2 branch1 &&
58 test_must_fail git merge master >/dev/null 2>&1 &&
59 ( yes "" | git mergetool file1 >/dev/null 2>&1 ) &&
60 ( yes "" | git mergetool file2 >/dev/null 2>&1 ) &&
t/t7810-grep.sh
+2 -2
@@ -452,7 +452,7 @@ test_expect_success 'outside of git repository' '
452 echo file1:hello &&
453 echo sub/file2:world
454 } >non/expect.full &&
455 - echo file2:world >non/expect.sub
455 + echo file2:world >non/expect.sub &&
456 (
457 GIT_CEILING_DIRECTORIES="$(pwd)/non/git" &&
458 export GIT_CEILING_DIRECTORIES &&
@@ -478,7 +478,7 @@ test_expect_success 'inside git repository but with --no-index' '
478 echo sub/file2:world
479 } >is/expect.full &&
480 : >is/expect.empty &&
481 - echo file2:world >is/expect.sub
481 + echo file2:world >is/expect.sub &&
482 (
483 cd is/git &&
484 git init &&
t/t9104-git-svn-follow-parent.sh
+1 -1
@@ -190,7 +190,7 @@ test_expect_success "follow-parent is atomic" '
190 git svn init --minimize-url -i stunk "$svnrepo"/stunk &&
191 git svn fetch -i stunk &&
192 git svn init --minimize-url -i flunked "$svnrepo"/flunked &&
193 - git svn fetch -i flunked
193 + git svn fetch -i flunked &&
194 test "`git rev-parse --verify refs/remotes/flunk@18`" \
195 = "`git rev-parse --verify refs/remotes/stunk`" &&
196 test "`git rev-parse --verify refs/remotes/flunk~1`" \
t/t9123-git-svn-rebuild-with-rewriteroot.sh
+1 -1
@@ -16,7 +16,7 @@ rm -rf import
16
17 test_expect_success 'init, fetch and checkout repository' '
18 git svn init --rewrite-root=http://invalid.invalid/ "$svnrepo" &&
19 - git svn fetch
19 + git svn fetch &&
20 git checkout -b mybranch ${remotes_git_svn}
21 '
22
t/t9124-git-svn-dcommit-auto-props.sh
+1 -1
@@ -24,7 +24,7 @@ test_expect_success 'initialize git svn' '
24 svn_cmd import -m "import for git svn" . "$svnrepo"
25 ) &&
26 rm -rf import &&
27 - git svn init "$svnrepo"
27 + git svn init "$svnrepo" &&
28 git svn fetch
29 '
30
t/t9151-svn-mergeinfo.sh
+11 -11
@@ -18,39 +18,39 @@ test_expect_success 'load svn dump' "
18
19 test_expect_success 'all svn merges became git merge commits' '
20 unmarked=$(git rev-list --parents --all --grep=Merge |
21 - grep -v " .* " | cut -f1 -d" ")
21 + grep -v " .* " | cut -f1 -d" ") &&
22 [ -z "$unmarked" ]
23 '
24
25 test_expect_success 'cherry picks did not become git merge commits' '
26 bad_cherries=$(git rev-list --parents --all --grep=Cherry |
27 - grep " .* " | cut -f1 -d" ")
27 + grep " .* " | cut -f1 -d" ") &&
28 [ -z "$bad_cherries" ]
29 '
30
31 test_expect_success 'svn non-merge merge commits did not become git merge commits' '
32 bad_non_merges=$(git rev-list --parents --all --grep=non-merge |
33 - grep " .* " | cut -f1 -d" ")
33 + grep " .* " | cut -f1 -d" ") &&
34 [ -z "$bad_non_merges" ]
35 '
36
37 test_expect_success 'commit made to merged branch is reachable from the merge' '
38 - before_commit=$(git rev-list --all --grep="trunk commit before merging trunk to b2")
39 - merge_commit=$(git rev-list --all --grep="Merge trunk to b2")
40 - not_reachable=$(git rev-list -1 $before_commit --not $merge_commit)
38 + before_commit=$(git rev-list --all --grep="trunk commit before merging trunk to b2") &&
39 + merge_commit=$(git rev-list --all --grep="Merge trunk to b2") &&
40 + not_reachable=$(git rev-list -1 $before_commit --not $merge_commit) &&
41 [ -z "$not_reachable" ]
42 '
43
44 test_expect_success 'merging two branches in one commit is detected correctly' '
45 - f1_commit=$(git rev-list --all --grep="make f1 branch from trunk")
46 - f2_commit=$(git rev-list --all --grep="make f2 branch from trunk")
47 - merge_commit=$(git rev-list --all --grep="Merge f1 and f2 to trunk")
48 - not_reachable=$(git rev-list -1 $f1_commit $f2_commit --not $merge_commit)
45 + f1_commit=$(git rev-list --all --grep="make f1 branch from trunk") &&
46 + f2_commit=$(git rev-list --all --grep="make f2 branch from trunk") &&
47 + merge_commit=$(git rev-list --all --grep="Merge f1 and f2 to trunk") &&
48 + not_reachable=$(git rev-list -1 $f1_commit $f2_commit --not $merge_commit) &&
49 [ -z "$not_reachable" ]
50 '
51
52 test_expect_failure 'everything got merged in the end' '
53 - unmerged=$(git rev-list --all --not master)
53 + unmerged=$(git rev-list --all --not master) &&
54 [ -z "$unmerged" ]
55 '
56
t/t9300-fast-import.sh
+1 -1
@@ -321,7 +321,7 @@ test_expect_success \
321 'for p in .git/objects/pack/*.pack;do git verify-pack $p||exit;done'
322 test_expect_success \
323 'C: validate reuse existing blob' \
324 - 'test $newf = `git rev-parse --verify branch:file2/newf`
324 + 'test $newf = `git rev-parse --verify branch:file2/newf` &&
325 test $oldf = `git rev-parse --verify branch:file2/oldf`'
326
327 cat >expect <<EOF
t/t9350-fast-export.sh
+1 -1
@@ -26,7 +26,7 @@ test_expect_success 'setup' '
26 test_tick &&
27 git tag rein &&
28 git checkout -b wer HEAD^ &&
29 - echo lange > file2
29 + echo lange > file2 &&
30 test_tick &&
31 git commit -m sitzt file2 &&
32 test_tick &&
t/t9400-git-cvsserver-server.sh
+1 -1
@@ -57,7 +57,7 @@ test_expect_success 'setup' '
57 # as argument to co -d
58 test_expect_success 'basic checkout' \
59 'GIT_CONFIG="$git_config" cvs -Q co -d cvswork master &&
60 - test "$(echo $(grep -v ^D cvswork/CVS/Entries|cut -d/ -f2,3,5 | head -n 1))" = "empty/1.1/"
60 + test "$(echo $(grep -v ^D cvswork/CVS/Entries|cut -d/ -f2,3,5 | head -n 1))" = "empty/1.1/" &&
61 test "$(echo $(grep -v ^D cvswork/CVS/Entries|cut -d/ -f2,3,5 | sed -ne \$p))" = "secondrootfile/1.1/"'
62
63 #------------------------
t/t9401-git-cvsserver-crlf.sh
+1 -1
@@ -70,7 +70,7 @@ test_expect_success 'setup' '
70 mkdir subdir &&
71 echo "Another text file" > subdir/file.h &&
72 echo "Another binary: Q (this time CR)" | q_to_cr > subdir/withCr.bin &&
73 - echo "Mixed up NUL, but marked text: Q <- there" | q_to_nul > mixedUp.c
73 + echo "Mixed up NUL, but marked text: Q <- there" | q_to_nul > mixedUp.c &&
74 echo "Unspecified" > subdir/unspecified.other &&
75 echo "/*.bin -crlf" > .gitattributes &&
76 echo "/*.c crlf" >> .gitattributes &&