]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t/*: fix ordering of expected/observed arguments
authorMatthew DeVore <matvore@google.com>
Fri, 5 Oct 2018 21:54:04 +0000 (14:54 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sat, 6 Oct 2018 23:51:18 +0000 (08:51 +0900)
Fix various places where the ordering was obviously wrong, meaning it
was easy to find with grep.

Signed-off-by: Matthew DeVore <matvore@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
32 files changed:
t/t0000-basic.sh
t/t0021-conversion.sh
t/t1300-config.sh
t/t1303-wacky-config.sh
t/t2101-update-index-reupdate.sh
t/t3200-branch.sh
t/t3320-notes-merge-worktrees.sh
t/t3400-rebase.sh
t/t3417-rebase-whitespace-fix.sh
t/t3702-add-edit.sh
t/t3903-stash.sh
t/t3905-stash-include-untracked.sh
t/t4025-hunk-header.sh
t/t4117-apply-reject.sh
t/t4124-apply-ws-rule.sh
t/t4138-apply-ws-expansion.sh
t/t5317-pack-objects-filter-objects.sh
t/t5318-commit-graph.sh
t/t5701-git-serve.sh
t/t5702-protocol-v2.sh
t/t6023-merge-file.sh
t/t6027-merge-binary.sh
t/t6031-merge-filemode.sh
t/t6112-rev-list-filters-objects.sh
t/t7201-co.sh
t/t7406-submodule-update.sh
t/t7800-difftool.sh
t/t9100-git-svn-basic.sh
t/t9133-git-svn-nested-git-repo.sh
t/t9600-cvsimport.sh
t/t9603-cvsimport-patchsets.sh
t/t9604-cvsimport-timestamps.sh

index 850f651e4e434084bbc8995fcfb3bb001d83875c..224c098a85c6816c992ce63f1faee39f4867905a 100755 (executable)
@@ -1018,7 +1018,7 @@ test_expect_success SHA1 'validate git diff-files output for a know cache/work t
 :120000 120000 6649a1ebe9e9f1c553b66f5a6e74136a07ccc57c 0000000000000000000000000000000000000000 M     path3/subp3/file3sym
 EOF
        git diff-files >current &&
-       test_cmp current expected
+       test_cmp expected current
 '
 
 test_expect_success 'git update-index --refresh should succeed' '
index 308cd28f3bd7304a63628e8a64014e8d20faa82f..fd5f1ac649dc411bf3c70dcb54f7965e4006aca8 100755 (executable)
@@ -166,10 +166,10 @@ test_expect_success expanded_in_repo '
        rm -f expanded-keywords expanded-keywords-crlf &&
 
        git checkout -- expanded-keywords &&
-       test_cmp expanded-keywords expected-output &&
+       test_cmp expected-output expanded-keywords &&
 
        git checkout -- expanded-keywords-crlf &&
-       test_cmp expanded-keywords-crlf expected-output-crlf
+       test_cmp expected-output-crlf expanded-keywords-crlf
 '
 
 # The use of %f in a filter definition is expanded to the path to
index 5869d6cb62ddc41c4b53148a1609181c20c5fb83..e2cd50ecfcbcd849661cb46f23c2ddb54e9ad19e 100755 (executable)
@@ -1001,7 +1001,7 @@ EOF
 
 test_expect_success 'value continued on next line' '
        git config --list > result &&
-       test_cmp result expect
+       test_cmp expect result
 '
 
 cat > .git/config <<\EOF
@@ -1882,7 +1882,7 @@ test_expect_success '--replace-all does not invent newlines' '
        Qkey = b
        EOF
        git config --replace-all abc.key b &&
-       test_cmp .git/config expect
+       test_cmp expect .git/config
 '
 
 test_done
index 3b92083e19d09bad951519201f9605a17b168c1a..0000e664e7b6d8c62cc12032f71224b832829e9d 100755 (executable)
@@ -14,7 +14,7 @@ setup() {
 check() {
        echo "$2" >expected
        git config --get "$1" >actual 2>&1
-       test_cmp actual expected
+       test_cmp expected actual
 }
 
 # 'check section.key regex value' verifies that the entry for
@@ -22,7 +22,7 @@ check() {
 check_regex() {
        echo "$3" >expected
        git config --get "$1" "$2" >actual 2>&1
-       test_cmp actual expected
+       test_cmp expected actual
 }
 
 test_expect_success 'modify same key' '
index 685ec45639a5e9a2bf929e10aa30976e9a4c456b..6c32d42c8c688845682d578141dbef760a663215 100755 (executable)
@@ -73,7 +73,7 @@ test_expect_success 'update-index --update from subdir' '
        100644 $(git hash-object dir1/file3) 0  dir1/file3
        100644 $file2 0 file2
        EOF
-       test_cmp current expected
+       test_cmp expected current
 '
 
 test_expect_success 'update-index --update with pathspec' '
index 93f21ab078080d00100cd63f6b5ee5cdfd636d29..478b82cf9b513a8f45f250de59d519847227f794 100755 (executable)
@@ -1221,7 +1221,7 @@ test_expect_success 'use --edit-description' '
        EOF
        EDITOR=./editor git branch --edit-description &&
        echo "New contents" >expect &&
-       test_cmp EDITOR_OUTPUT expect
+       test_cmp expect EDITOR_OUTPUT
 '
 
 test_expect_success 'detect typo in branch name when using --edit-description' '
index 10bfc8b94710caf8d33a3a1fa66ad3a4ba394c0f..823fdbda1f32355e6db952976c1210b35fd452ec 100755 (executable)
@@ -44,7 +44,7 @@ test_expect_success 'merge z into y fails and sets NOTES_MERGE_REF' '
        git config core.notesRef refs/notes/y &&
        test_must_fail git notes merge z &&
        echo "ref: refs/notes/y" >expect &&
-       test_cmp .git/NOTES_MERGE_REF expect
+       test_cmp expect .git/NOTES_MERGE_REF
 '
 
 test_expect_success 'merge z into y while mid-merge in another workdir fails' '
@@ -66,7 +66,7 @@ test_expect_success 'merge z into x while mid-merge on y succeeds' '
                grep -v "A notes merge into refs/notes/x is already in-progress in" out
        ) &&
        echo "ref: refs/notes/x" >expect &&
-       test_cmp .git/worktrees/worktree2/NOTES_MERGE_REF expect
+       test_cmp expect .git/worktrees/worktree2/NOTES_MERGE_REF
 '
 
 test_done
index 3996ee013563ce1f91b2a693318b1e07aba96568..3e73f7584ce7d3a23e7e75d0f71bd595f5f822a3 100755 (executable)
@@ -183,13 +183,13 @@ test_expect_success 'cherry-picked commits and fork-point work together' '
        test_commit final_B B "Final B" &&
        git rebase &&
        echo Amended >expect &&
-       test_cmp A expect &&
+       test_cmp expect A &&
        echo "Final B" >expect &&
-       test_cmp B expect &&
+       test_cmp expect B &&
        echo C >expect &&
-       test_cmp C expect &&
+       test_cmp expect C &&
        echo D >expect &&
-       test_cmp D expect
+       test_cmp expect D
 '
 
 test_expect_success 'rebase -q is quiet' '
index 1fb3e499b4a044d935c090bfa567a7ace271c054..e85cdc7037bcb6184d1ce6f9aa7ff2cfc4af2096 100755 (executable)
@@ -55,7 +55,7 @@ test_expect_success 'blank line at end of file; extend at end of file' '
        git add file && git commit -m second &&
        git rebase --whitespace=fix HEAD^^ &&
        git diff --exit-code HEAD^:file expect-first &&
-       test_cmp file expect-second
+       test_cmp expect-second file
 '
 
 # prepare third revision of "file"
@@ -82,7 +82,7 @@ test_expect_success 'two blanks line at end of file; extend at end of file' '
        cp third file && git add file && git commit -m third &&
        git rebase --whitespace=fix HEAD^^ &&
        git diff --exit-code HEAD^:file expect-second &&
-       test_cmp file expect-third
+       test_cmp expect-third file
 '
 
 test_expect_success 'same, but do not remove trailing spaces' '
@@ -120,7 +120,7 @@ test_expect_success 'at beginning of file' '
        done >> file &&
        git commit -m more file &&
        git rebase --whitespace=fix HEAD^^ &&
-       test_cmp file expect-beginning
+       test_cmp expect-beginning file
 '
 
 test_done
index c6af7f82b58f606b3f6c7e2612931a1fc2af15c7..6c676645d837477077e9e349bf01398f3aa52b5f 100755 (executable)
@@ -110,10 +110,10 @@ test_expect_success 'add -e' '
        cp second-part file &&
        git add -e &&
        test_cmp second-part file &&
-       test_cmp orig-patch expected-patch &&
+       test_cmp expected-patch orig-patch &&
        git diff --cached >actual &&
        grep -v index actual >out &&
-       test_cmp out expected
+       test_cmp expected out
 
 '
 
index 6450bc669860f0f3e7d809514fc073013ffbf0b8..cd216655b97b852eec963916e796d11d32eb976a 100755 (executable)
@@ -36,7 +36,7 @@ EOF
 test_expect_success 'parents of stash' '
        test $(git rev-parse stash^) = $(git rev-parse HEAD) &&
        git diff stash^2..stash > output &&
-       test_cmp output expect
+       test_cmp expect output
 '
 
 test_expect_success 'applying bogus stash does nothing' '
@@ -210,9 +210,9 @@ test_expect_success 'stash branch' '
        test refs/heads/stashbranch = $(git symbolic-ref HEAD) &&
        test $(git rev-parse HEAD) = $(git rev-parse master^) &&
        git diff --cached > output &&
-       test_cmp output expect &&
+       test_cmp expect output &&
        git diff > output &&
-       test_cmp output expect1 &&
+       test_cmp expect1 output &&
        git add file &&
        git commit -m alternate\ second &&
        git diff master..stashbranch > output &&
@@ -710,7 +710,7 @@ test_expect_success 'stash where working directory contains "HEAD" file' '
        git diff-index --cached --quiet HEAD &&
        test "$(git rev-parse stash^)" = "$(git rev-parse HEAD)" &&
        git diff stash^..stash > output &&
-       test_cmp output expect
+       test_cmp expect output
 '
 
 test_expect_success 'store called with invalid commit' '
index 597b0637d160be0cab4d3114aace598616e371fd..cc1c8a7bb2da508e570621ddf9e08694007425d4 100755 (executable)
@@ -142,7 +142,7 @@ test_expect_success 'stash save --include-untracked removed files' '
        rm -f file &&
        git stash save --include-untracked &&
        echo 1 > expect &&
-       test_cmp file expect
+       test_cmp expect file
 '
 
 rm -f expect
index fa44e788695c6f3226ad17cb6e8f2b8e256814ed..35578f2bb91dab8a00f40b5fbb26bd0a31ca7d58 100755 (executable)
@@ -37,7 +37,7 @@ test_expect_success 'hunk header truncation with an overly long line' '
                echo " A $N$N$N$N$N$N$N$N$N2" &&
                echo " L  $N$N$N$N$N$N$N$N$N1"
        ) >expected &&
-       test_cmp actual expected
+       test_cmp expected actual
 
 '
 
index d80187de9446c3129e1c69d3b67278f2fd40c9a0..f7de6f077a6e055b79dfc2ae572f1552c40d2eb3 100755 (executable)
@@ -72,7 +72,7 @@ test_expect_success 'apply with --reject should fail but update the file' '
        rm -f file1.rej file2.rej &&
 
        test_must_fail git apply --reject patch.1 &&
-       test_cmp file1 expected &&
+       test_cmp expected file1 &&
 
        cat file1.rej &&
        test_path_is_missing file2.rej
@@ -85,7 +85,7 @@ test_expect_success 'apply with --reject should fail but update the file' '
 
        test_must_fail git apply --reject patch.2 >rejects &&
        test_path_is_missing file1 &&
-       test_cmp file2 expected &&
+       test_cmp expected file2 &&
 
        cat file2.rej &&
        test_path_is_missing file1.rej
@@ -99,7 +99,7 @@ test_expect_success 'the same test with --verbose' '
 
        test_must_fail git apply --reject --verbose patch.2 >rejects &&
        test_path_is_missing file1 &&
-       test_cmp file2 expected &&
+       test_cmp expected file2 &&
 
        cat file2.rej &&
        test_path_is_missing file1.rej
index 7e32237a2ae9a21e370d501caa8adfe561c6bc6b..ff51e9e78914e4b9c7a801b4f88f3691b5f2844d 100755 (executable)
@@ -313,9 +313,9 @@ test_expect_success 'applying beyond EOF requires one non-blank context line' '
        { echo a; echo; } >one &&
        cp one expect &&
        test_must_fail git apply --whitespace=fix patch &&
-       test_cmp one expect &&
+       test_cmp expect one &&
        test_must_fail git apply --ignore-space-change --whitespace=fix patch &&
-       test_cmp one expect
+       test_cmp expect one
 '
 
 test_expect_success 'tons of blanks at EOF should not apply' '
@@ -342,10 +342,10 @@ test_expect_success 'missing blank line at end with --whitespace=fix' '
        cp one saved-one &&
        test_must_fail git apply patch &&
        git apply --whitespace=fix patch &&
-       test_cmp one expect &&
+       test_cmp expect one &&
        mv saved-one one &&
        git apply --ignore-space-change --whitespace=fix patch &&
-       test_cmp one expect
+       test_cmp expect one
 '
 
 test_expect_success 'two missing blank lines at end with --whitespace=fix' '
@@ -360,11 +360,11 @@ test_expect_success 'two missing blank lines at end with --whitespace=fix' '
        cp no-blank-lines one &&
        test_must_fail git apply patch &&
        git apply --whitespace=fix patch &&
-       test_cmp one expect &&
+       test_cmp expect one &&
        mv no-blank-lines one &&
        test_must_fail git apply patch &&
        git apply --ignore-space-change --whitespace=fix patch &&
-       test_cmp one expect
+       test_cmp expect one
 '
 
 test_expect_success 'missing blank line at end, insert before end, --whitespace=fix' '
@@ -376,7 +376,7 @@ test_expect_success 'missing blank line at end, insert before end, --whitespace=
        echo a >one &&
        test_must_fail git apply patch &&
        git apply --whitespace=fix patch &&
-       test_cmp one expect
+       test_cmp expect one
 '
 
 test_expect_success 'shrink file with tons of missing blanks at end of file' '
@@ -392,10 +392,10 @@ test_expect_success 'shrink file with tons of missing blanks at end of file' '
        cp no-blank-lines one &&
        test_must_fail git apply patch &&
        git apply --whitespace=fix patch &&
-       test_cmp one expect &&
+       test_cmp expect one &&
        mv no-blank-lines one &&
        git apply --ignore-space-change --whitespace=fix patch &&
-       test_cmp one expect
+       test_cmp expect one
 '
 
 test_expect_success 'missing blanks at EOF must only match blank lines' '
@@ -427,7 +427,7 @@ test_expect_success 'missing blank line should match context line with spaces' '
        git add one &&
 
        git apply --whitespace=fix patch &&
-       test_cmp one expect
+       test_cmp expect one
 '
 
 sed -e's/Z//' >one <<EOF
@@ -447,7 +447,7 @@ test_expect_success 'same, but with the --ignore-space-option' '
 
        git checkout-index -f one &&
        git apply --ignore-space-change --whitespace=fix patch &&
-       test_cmp one expect
+       test_cmp expect one
 '
 
 test_expect_success 'same, but with CR-LF line endings && cr-at-eol set' '
@@ -464,7 +464,7 @@ test_expect_success 'same, but with CR-LF line endings && cr-at-eol set' '
        mv save-one one &&
 
        git apply --ignore-space-change --whitespace=fix patch &&
-       test_cmp one expect
+       test_cmp expect one
 '
 
 test_expect_success 'CR-LF line endings && add line && text=auto' '
@@ -478,7 +478,7 @@ test_expect_success 'CR-LF line endings && add line && text=auto' '
        mv save-one one &&
        echo "one text=auto" >.gitattributes &&
        git apply patch &&
-       test_cmp one expect
+       test_cmp expect one
 '
 
 test_expect_success 'CR-LF line endings && change line && text=auto' '
@@ -491,7 +491,7 @@ test_expect_success 'CR-LF line endings && change line && text=auto' '
        mv save-one one &&
        echo "one text=auto" >.gitattributes &&
        git apply patch &&
-       test_cmp one expect
+       test_cmp expect one
 '
 
 test_expect_success 'LF in repo, CRLF in worktree && change line && text=auto' '
@@ -503,7 +503,7 @@ test_expect_success 'LF in repo, CRLF in worktree && change line && text=auto' '
        echo "one text=auto" >.gitattributes &&
        git -c core.eol=CRLF apply patch &&
        printf "b\r\n" >expect &&
-       test_cmp one expect
+       test_cmp expect one
 '
 
 test_expect_success 'whitespace=fix to expand' '
index 0ffe33fbefdc72c664d3914da234f7d4052ed462..3b636a63a3ef048c4568442d4354c7ad4d6a73f0 100755 (executable)
@@ -114,7 +114,7 @@ for t in 1 2 3 4
 do
        test_expect_success 'apply with ws expansion (t=$t)' '
                git apply patch$t.patch &&
-               test_cmp test-$t expect-$t
+               test_cmp expect-$t test-$t
        '
 done
 
index ce69148ec111ccf83d01b392b5873d65d3dce226..c093eb89130e726e43a45c02be804ec7cf358e92 100755 (executable)
@@ -34,7 +34,7 @@ test_expect_success 'verify blob count in normal packfile' '
        awk -f print_1.awk |
        sort >observed &&
 
-       test_cmp observed expected
+       test_cmp expected observed
 '
 
 test_expect_success 'verify blob:none packfile has no blobs' '
@@ -63,7 +63,7 @@ test_expect_success 'verify normal and blob:none packfiles have same commits/tre
        awk -f print_1.awk |
        sort >observed &&
 
-       test_cmp observed expected
+       test_cmp expected observed
 '
 
 # Test blob:limit=<n>[kmg] filter.
@@ -96,7 +96,7 @@ test_expect_success 'verify blob count in normal packfile' '
        awk -f print_1.awk |
        sort >observed &&
 
-       test_cmp observed expected
+       test_cmp expected observed
 '
 
 test_expect_success 'verify blob:limit=500 omits all blobs' '
@@ -144,7 +144,7 @@ test_expect_success 'verify blob:limit=1001' '
        awk -f print_1.awk |
        sort >observed &&
 
-       test_cmp observed expected
+       test_cmp expected observed
 '
 
 test_expect_success 'verify blob:limit=10001' '
@@ -162,7 +162,7 @@ test_expect_success 'verify blob:limit=10001' '
        awk -f print_1.awk |
        sort >observed &&
 
-       test_cmp observed expected
+       test_cmp expected observed
 '
 
 test_expect_success 'verify blob:limit=1k' '
@@ -180,7 +180,7 @@ test_expect_success 'verify blob:limit=1k' '
        awk -f print_1.awk |
        sort >observed &&
 
-       test_cmp observed expected
+       test_cmp expected observed
 '
 
 test_expect_success 'verify explicitly specifying oversized blob in input' '
@@ -199,7 +199,7 @@ test_expect_success 'verify explicitly specifying oversized blob in input' '
        awk -f print_1.awk |
        sort >observed &&
 
-       test_cmp observed expected
+       test_cmp expected observed
 '
 
 test_expect_success 'verify blob:limit=1m' '
@@ -217,7 +217,7 @@ test_expect_success 'verify blob:limit=1m' '
        awk -f print_1.awk |
        sort >observed &&
 
-       test_cmp observed expected
+       test_cmp expected observed
 '
 
 test_expect_success 'verify normal and blob:limit packfiles have same commits/trees' '
@@ -231,7 +231,7 @@ test_expect_success 'verify normal and blob:limit packfiles have same commits/tr
        awk -f print_1.awk |
        sort >observed &&
 
-       test_cmp observed expected
+       test_cmp expected observed
 '
 
 # Test sparse:path=<path> filter.
@@ -269,7 +269,7 @@ test_expect_success 'verify blob count in normal packfile' '
        awk -f print_1.awk |
        sort >observed &&
 
-       test_cmp observed expected
+       test_cmp expected observed
 '
 
 test_expect_success 'verify sparse:path=pattern1' '
@@ -287,7 +287,7 @@ test_expect_success 'verify sparse:path=pattern1' '
        awk -f print_1.awk |
        sort >observed &&
 
-       test_cmp observed expected
+       test_cmp expected observed
 '
 
 test_expect_success 'verify normal and sparse:path=pattern1 packfiles have same commits/trees' '
@@ -301,7 +301,7 @@ test_expect_success 'verify normal and sparse:path=pattern1 packfiles have same
        awk -f print_1.awk |
        sort >observed &&
 
-       test_cmp observed expected
+       test_cmp expected observed
 '
 
 test_expect_success 'verify sparse:path=pattern2' '
@@ -319,7 +319,7 @@ test_expect_success 'verify sparse:path=pattern2' '
        awk -f print_1.awk |
        sort >observed &&
 
-       test_cmp observed expected
+       test_cmp expected observed
 '
 
 test_expect_success 'verify normal and sparse:path=pattern2 packfiles have same commits/trees' '
@@ -333,7 +333,7 @@ test_expect_success 'verify normal and sparse:path=pattern2 packfiles have same
        awk -f print_1.awk |
        sort >observed &&
 
-       test_cmp observed expected
+       test_cmp expected observed
 '
 
 # Test sparse:oid=<oid-ish> filter.
@@ -370,7 +370,7 @@ test_expect_success 'verify blob count in normal packfile' '
        awk -f print_1.awk |
        sort >observed &&
 
-       test_cmp observed expected
+       test_cmp expected observed
 '
 
 test_expect_success 'verify sparse:oid=OID' '
@@ -389,7 +389,7 @@ test_expect_success 'verify sparse:oid=OID' '
        awk -f print_1.awk |
        sort >observed &&
 
-       test_cmp observed expected
+       test_cmp expected observed
 '
 
 test_expect_success 'verify sparse:oid=oid-ish' '
@@ -407,7 +407,7 @@ test_expect_success 'verify sparse:oid=oid-ish' '
        awk -f print_1.awk |
        sort >observed &&
 
-       test_cmp observed expected
+       test_cmp expected observed
 '
 
 # Delete some loose objects and use pack-objects, but WITHOUT any filtering.
index 0c500f7ca2641a2752f5d4819bb11efcf5f588bf..d6da3ce4e203cdc4017de227adf196d75b4badb2 100755 (executable)
@@ -35,7 +35,7 @@ test_expect_success 'create commits and repack' '
 graph_git_two_modes() {
        git -c core.commitGraph=true $1 >output
        git -c core.commitGraph=false $1 >expect
-       test_cmp output expect
+       test_cmp expect output
 }
 
 graph_git_behavior() {
index 75ec79e6cb839e71f6830d9301d1982d0fc68925..bf139e245937bc1dca1eeb924dbf193a7c347a2a 100755 (executable)
@@ -16,7 +16,7 @@ test_expect_success 'test capability advertisement' '
 
        git serve --advertise-capabilities >out &&
        test-pkt-line unpack <out >actual &&
-       test_cmp actual expect
+       test_cmp expect actual
 '
 
 test_expect_success 'stateless-rpc flag does not list capabilities' '
@@ -89,7 +89,7 @@ test_expect_success 'basics of ls-refs' '
 
        git serve --stateless-rpc <in >out &&
        test-pkt-line unpack <out >actual &&
-       test_cmp actual expect
+       test_cmp expect actual
 '
 
 test_expect_success 'basic ref-prefixes' '
@@ -109,7 +109,7 @@ test_expect_success 'basic ref-prefixes' '
 
        git serve --stateless-rpc <in >out &&
        test-pkt-line unpack <out >actual &&
-       test_cmp actual expect
+       test_cmp expect actual
 '
 
 test_expect_success 'refs/heads prefix' '
@@ -129,7 +129,7 @@ test_expect_success 'refs/heads prefix' '
 
        git serve --stateless-rpc <in >out &&
        test-pkt-line unpack <out >actual &&
-       test_cmp actual expect
+       test_cmp expect actual
 '
 
 test_expect_success 'peel parameter' '
@@ -150,7 +150,7 @@ test_expect_success 'peel parameter' '
 
        git serve --stateless-rpc <in >out &&
        test-pkt-line unpack <out >actual &&
-       test_cmp actual expect
+       test_cmp expect actual
 '
 
 test_expect_success 'symrefs parameter' '
@@ -171,7 +171,7 @@ test_expect_success 'symrefs parameter' '
 
        git serve --stateless-rpc <in >out &&
        test-pkt-line unpack <out >actual &&
-       test_cmp actual expect
+       test_cmp expect actual
 '
 
 test_expect_success 'sending server-options' '
@@ -191,7 +191,7 @@ test_expect_success 'sending server-options' '
 
        git serve --stateless-rpc <in >out &&
        test-pkt-line unpack <out >actual &&
-       test_cmp actual expect
+       test_cmp expect actual
 '
 
 test_expect_success 'unexpected lines are not allowed in fetch request' '
index 3beeed4546cee6c7793de94ba2735b0e6d63b073..54727450b050be9278b6659ff61d28ef09e5dc8e 100755 (executable)
@@ -29,7 +29,7 @@ test_expect_success 'list refs with git:// using protocol v2' '
        grep "git< version 2" log &&
 
        git ls-remote --symref "$GIT_DAEMON_URL/parent" >expect &&
-       test_cmp actual expect
+       test_cmp expect actual
 '
 
 test_expect_success 'ref advertisment is filtered with ls-remote using protocol v2' '
@@ -42,7 +42,7 @@ test_expect_success 'ref advertisment is filtered with ls-remote using protocol
        $(git -C "$daemon_parent" rev-parse refs/heads/master)$(printf "\t")refs/heads/master
        EOF
 
-       test_cmp actual expect
+       test_cmp expect actual
 '
 
 test_expect_success 'clone with git:// using protocol v2' '
@@ -138,7 +138,7 @@ test_expect_success 'list refs with file:// using protocol v2' '
        grep "git< version 2" log &&
 
        git ls-remote --symref "file://$(pwd)/file_parent" >expect &&
-       test_cmp actual expect
+       test_cmp expect actual
 '
 
 test_expect_success 'ref advertisment is filtered with ls-remote using protocol v2' '
@@ -151,7 +151,7 @@ test_expect_success 'ref advertisment is filtered with ls-remote using protocol
        $(git -C file_parent rev-parse refs/heads/master)$(printf "\t")refs/heads/master
        EOF
 
-       test_cmp actual expect
+       test_cmp expect actual
 '
 
 test_expect_success 'server-options are sent when using ls-remote' '
@@ -164,7 +164,7 @@ test_expect_success 'server-options are sent when using ls-remote' '
        $(git -C file_parent rev-parse refs/heads/master)$(printf "\t")refs/heads/master
        EOF
 
-       test_cmp actual expect &&
+       test_cmp expect actual &&
        grep "server-option=hello" log &&
        grep "server-option=world" log
 '
index 20aee43f95ab3cc38b8671a233089873fe374777..51ee887a77639adca91b19c73fb297e33bc34f96 100755 (executable)
@@ -99,7 +99,7 @@ EOF
 printf "propter nomen suum." >> expect.txt
 
 test_expect_success "merge does not add LF away of change" \
-       "test_cmp test3.txt expect.txt"
+       "test_cmp expect.txt test3.txt"
 
 cp test.txt backup.txt
 test_expect_success "merge with conflicts" \
@@ -122,7 +122,7 @@ non timebo mala, quoniam tu mecum es:
 virga tua et baculus tuus ipsa me consolata sunt.
 EOF
 
-test_expect_success "expected conflict markers" "test_cmp test.txt expect.txt"
+test_expect_success "expected conflict markers" "test_cmp expect.txt test.txt"
 
 cp backup.txt test.txt
 
@@ -138,7 +138,7 @@ non timebo mala, quoniam tu mecum es:
 virga tua et baculus tuus ipsa me consolata sunt.
 EOF
 test_expect_success "merge conflicting with --ours" \
-       "git merge-file --ours test.txt orig.txt new3.txt && test_cmp test.txt expect.txt"
+       "git merge-file --ours test.txt orig.txt new3.txt && test_cmp expect.txt test.txt"
 cp backup.txt test.txt
 
 cat > expect.txt << EOF
@@ -154,7 +154,7 @@ non timebo mala, quoniam tu mecum es:
 virga tua et baculus tuus ipsa me consolata sunt.
 EOF
 test_expect_success "merge conflicting with --theirs" \
-       "git merge-file --theirs test.txt orig.txt new3.txt && test_cmp test.txt expect.txt"
+       "git merge-file --theirs test.txt orig.txt new3.txt && test_cmp expect.txt test.txt"
 cp backup.txt test.txt
 
 cat > expect.txt << EOF
@@ -171,7 +171,7 @@ non timebo mala, quoniam tu mecum es:
 virga tua et baculus tuus ipsa me consolata sunt.
 EOF
 test_expect_success "merge conflicting with --union" \
-       "git merge-file --union test.txt orig.txt new3.txt && test_cmp test.txt expect.txt"
+       "git merge-file --union test.txt orig.txt new3.txt && test_cmp expect.txt test.txt"
 cp backup.txt test.txt
 
 test_expect_success "merge with conflicts, using -L" \
@@ -195,7 +195,7 @@ virga tua et baculus tuus ipsa me consolata sunt.
 EOF
 
 test_expect_success "expected conflict markers, with -L" \
-       "test_cmp test.txt expect.txt"
+       "test_cmp expect.txt test.txt"
 
 sed "s/ tu / TU /" < new1.txt > new5.txt
 test_expect_success "conflict in removed tail" \
index 07735410b9536ba7639134c7ca0cda4f486f8291..4e6c7cb77e7dc42c9f21b8ca84f8a64b1ed7d3af 100755 (executable)
@@ -45,7 +45,7 @@ test_expect_success resolve '
                false
        else
                git ls-files -s >current
-               test_cmp current expect
+               test_cmp expect current
        fi
 '
 
@@ -60,7 +60,7 @@ test_expect_success recursive '
                false
        else
                git ls-files -s >current
-               test_cmp current expect
+               test_cmp expect current
        fi
 '
 
index 7d06461f1396583f7ec568c9bd5bb17735938e34..87741efad319237477541823637a8bf47c1a254d 100755 (executable)
@@ -61,7 +61,7 @@ do_both_modes () {
                git checkout -f a2 &&
                test_must_fail git merge -s $strategy b2 &&
                git ls-files -u >actual &&
-               test_cmp actual expect &&
+               test_cmp expect actual &&
                git ls-files -s file2 | grep ^100755
        '
 
index 0f6b569e197eb3f15f2c5a2cad2c3eb09e2be3b9..ae4402226b96fa067b5b7a3bbd8ad654b918bfaa 100755 (executable)
@@ -29,7 +29,7 @@ test_expect_success 'verify blob:none omits all 5 blobs' '
        sed "s/~//" |
        sort >observed &&
 
-       test_cmp observed expected
+       test_cmp expected observed
 '
 
 test_expect_success 'verify emitted+omitted == all' '
@@ -42,7 +42,7 @@ test_expect_success 'verify emitted+omitted == all' '
        sed "s/~//" |
        sort >observed &&
 
-       test_cmp observed expected
+       test_cmp expected observed
 '
 
 
@@ -71,7 +71,7 @@ test_expect_success 'verify blob:limit=500 omits all blobs' '
        sed "s/~//" |
        sort >observed &&
 
-       test_cmp observed expected
+       test_cmp expected observed
 '
 
 test_expect_success 'verify emitted+omitted == all' '
@@ -84,7 +84,7 @@ test_expect_success 'verify emitted+omitted == all' '
        sed "s/~//" |
        sort >observed &&
 
-       test_cmp observed expected
+       test_cmp expected observed
 '
 
 test_expect_success 'verify blob:limit=1000' '
@@ -97,7 +97,7 @@ test_expect_success 'verify blob:limit=1000' '
        sed "s/~//" |
        sort >observed &&
 
-       test_cmp observed expected
+       test_cmp expected observed
 '
 
 test_expect_success 'verify blob:limit=1001' '
@@ -110,7 +110,7 @@ test_expect_success 'verify blob:limit=1001' '
        sed "s/~//" |
        sort >observed &&
 
-       test_cmp observed expected
+       test_cmp expected observed
 '
 
 test_expect_success 'verify blob:limit=1k' '
@@ -123,7 +123,7 @@ test_expect_success 'verify blob:limit=1k' '
        sed "s/~//" |
        sort >observed &&
 
-       test_cmp observed expected
+       test_cmp expected observed
 '
 
 test_expect_success 'verify blob:limit=1m' '
@@ -165,7 +165,7 @@ test_expect_success 'verify sparse:path=pattern1 omits top-level files' '
        sed "s/~//" |
        sort >observed &&
 
-       test_cmp observed expected
+       test_cmp expected observed
 '
 
 test_expect_success 'verify sparse:path=pattern2 omits both sparse2 files' '
@@ -178,7 +178,7 @@ test_expect_success 'verify sparse:path=pattern2 omits both sparse2 files' '
        sed "s/~//" |
        sort >observed &&
 
-       test_cmp observed expected
+       test_cmp expected observed
 '
 
 # Test sparse:oid=<oid-ish> filter.
@@ -203,7 +203,7 @@ test_expect_success 'verify sparse:oid=OID omits top-level files' '
        sed "s/~//" |
        sort >observed &&
 
-       test_cmp observed expected
+       test_cmp expected observed
 '
 
 test_expect_success 'verify sparse:oid=oid-ish omits top-level files' '
@@ -216,7 +216,7 @@ test_expect_success 'verify sparse:oid=oid-ish omits top-level files' '
        sed "s/~//" |
        sort >observed &&
 
-       test_cmp observed expected
+       test_cmp expected observed
 '
 
 # Delete some loose objects and use rev-list, but WITHOUT any filtering.
@@ -237,7 +237,7 @@ test_expect_success 'rev-list W/ --missing=print' '
        sed "s/?//" |
        sort >observed &&
 
-       test_cmp observed expected
+       test_cmp expected observed
 '
 
 test_expect_success 'rev-list W/O --missing fails' '
index 324933acfe94153e166783e9810e98e69da1fc7e..826987ca804fbd74bc06467446c99b7b4a27ea3e 100755 (executable)
@@ -160,7 +160,7 @@ test_expect_success 'checkout -m with merge conflict' '
        git diff master:one :3:uno |
        sed -e "1,/^@@/d" -e "/^ /d" -e "s/^-/d/" -e "s/^+/a/" >current &&
        fill d2 aT d7 aS >expect &&
-       test_cmp current expect &&
+       test_cmp expect current &&
        git diff --cached two >current &&
        test_must_be_empty current
 '
@@ -174,7 +174,7 @@ test_expect_success 'format of merge conflict from checkout -m' '
 
        git ls-files >current &&
        fill same two two two >expect &&
-       test_cmp current expect &&
+       test_cmp expect current &&
 
        cat <<-EOF >expect &&
        <<<<<<< simple
index 10dc91620a69870ab5dac213d032ae5d9938128c..e87164aa8ffdba169ba6f91af99ae3d28f28459b 100755 (executable)
@@ -789,7 +789,7 @@ test_expect_success 'submodule add places git-dir in superprojects git-dir' '
         (cd .git/modules/deeper/submodule &&
          git log > ../../../../actual
         ) &&
-        test_cmp actual expected
+        test_cmp expected actual
        )
 '
 
@@ -807,7 +807,7 @@ test_expect_success 'submodule update places git-dir in superprojects git-dir' '
         (cd .git/modules/deeper/submodule &&
          git log > ../../../../actual
         ) &&
-        test_cmp actual expected
+        test_cmp expected actual
        )
 '
 
@@ -827,7 +827,7 @@ test_expect_success 'submodule add places git-dir in superprojects git-dir recur
         git add deeper/submodule &&
         git commit -m "update submodule" &&
         git push origin : &&
-        test_cmp actual expected
+        test_cmp expected actual
        )
 '
 
@@ -874,7 +874,7 @@ test_expect_success 'submodule update places git-dir in superprojects git-dir re
         (cd .git/modules/submodule/modules/subsubmodule &&
          git log > ../../../../../actual
         ) &&
-        test_cmp actual expected
+        test_cmp expected actual
        )
 '
 
index 668bbee73c8dc58c6ba61c4a8002ed68206d1445..562bd215a5315757dcc7c10e311106f2c7b0ff72 100755 (executable)
@@ -557,7 +557,7 @@ test_expect_success SYMLINKS 'difftool --dir-diff --symlink without unstaged cha
        EOF
        git difftool --dir-diff --symlink \
                --extcmd "./.git/CHECK_SYMLINKS" branch HEAD &&
-       test_cmp actual expect
+       test_cmp expect actual
 '
 
 write_script modify-right-file <<\EOF
index 9af60788443a9e69f3ffa7eca079a15f5bafc457..2c309a57d98898e99b76289d2eb298a2bce8cb00 100755 (executable)
@@ -221,7 +221,7 @@ tree d667270a1f7b109f5eb3aaea21ede14b56bfdd6e
 tree 8f51f74cf0163afc9ad68a4b1537288c4558b5a4
 EOF
 
-test_expect_success POSIXPERM,SYMLINKS "$name" "test_cmp a expected"
+test_expect_success POSIXPERM,SYMLINKS "$name" "test_cmp expected a"
 
 test_expect_success 'exit if remote refs are ambigious' '
         git config --add svn-remote.svn.fetch \
index f3c30e63b7f584cddb91793b0170f004d866530d..f894860867a1398555876ce0586479157189a376 100755 (executable)
@@ -45,7 +45,7 @@ test_expect_success 'update git svn-cloned repo' '
                git svn rebase &&
                echo a > expect &&
                echo b >> expect &&
-               test_cmp a expect &&
+               test_cmp expect a &&
                rm expect
        )
 '
@@ -69,7 +69,7 @@ test_expect_success 'update git svn-cloned repo' '
                git svn rebase &&
                echo a > expect &&
                echo b >> expect &&
-               test_cmp a expect &&
+               test_cmp expect a &&
                rm expect
        )
 '
@@ -93,7 +93,7 @@ test_expect_success 'update git svn-cloned repo again' '
                echo a > expect &&
                echo b >> expect &&
                echo c >> expect &&
-               test_cmp a expect &&
+               test_cmp expect a &&
                rm expect
        )
 '
index 5dfee07d9add00d4a68e70c89c8711604f218ef1..251fdd66c47b5e378cf091a47ba1f804eb74c487 100755 (executable)
@@ -148,7 +148,7 @@ test_expect_success PERL 'import from a CVS working tree' '
                git cvsimport -a -z0 &&
                echo 1 >expect &&
                git log -1 --pretty=format:%s%n >actual &&
-               test_cmp actual expect
+               test_cmp expect actual
        )
 
 '
index c4c3c4954612ff317a72bc342741bee8f3c628b0..3e64b11eac5ebb7b0c01487c5f11bf39cd9855c0 100755 (executable)
@@ -29,11 +29,11 @@ test_expect_failure PERL 'import with criss cross times on revisions' '
 Rev 3
 Rev 2
 Rev 1" > expect-master &&
-    test_cmp actual-master expect-master &&
+    test_cmp expect-master actual-master &&
 
     echo "Rev 5 Branch A Wed Mar 11 19:09:10 2009 +0000
 Rev 4 Branch A Wed Mar 11 19:03:52 2009 +0000" > expect-A &&
-    test_cmp actual-A expect-A
+    test_cmp expect-A actual-A
 '
 
 test_done
index a4b3db24bd9afee29de1679b47a5371a10c9863c..2ff4aa932df44e3afed6447acceb20e8c599c4ea 100755 (executable)
@@ -31,7 +31,7 @@ test_expect_success PERL 'check timestamps are UTC (TZ=CST6CDT)' '
        Rev  2 2005-02-01 00:00:00 +0000
        Rev  1 2005-01-01 00:00:00 +0000
        EOF
-       test_cmp actual-1 expect-1
+       test_cmp expect-1 actual-1
 '
 
 test_expect_success PERL 'check timestamps with author-specific timezones' '
@@ -65,7 +65,7 @@ test_expect_success PERL 'check timestamps with author-specific timezones' '
        Rev  2 2005-01-31 18:00:00 -0600 User Two
        Rev  1 2005-01-01 00:00:00 +0000 User One
        EOF
-       test_cmp actual-2 expect-2
+       test_cmp expect-2 actual-2
 '
 
 test_done