@@ -58,6 +58,11 @@ test_expect_success 'fetch with transfer.fsckobjects' '
5858 )
5959'
6060
61+ cat > exp << EOF
62+ To dst
63+ ! refs/heads/master:refs/heads/test [remote rejected] (missing necessary objects)
64+ EOF
65+
6166test_expect_success ' push without strict' '
6267 rm -rf dst &&
6368 git init dst &&
@@ -66,7 +71,8 @@ test_expect_success 'push without strict' '
6671 git config fetch.fsckobjects false &&
6772 git config transfer.fsckobjects false
6873 ) &&
69- git push dst master:refs/heads/test
74+ test_must_fail git push --porcelain dst master:refs/heads/test >act &&
75+ test_cmp exp act
7076'
7177
7278test_expect_success ' push with !receive.fsckobjects' '
@@ -77,9 +83,15 @@ test_expect_success 'push with !receive.fsckobjects' '
7783 git config receive.fsckobjects false &&
7884 git config transfer.fsckobjects true
7985 ) &&
80- git push dst master:refs/heads/test
86+ test_must_fail git push --porcelain dst master:refs/heads/test >act &&
87+ test_cmp exp act
8188'
8289
90+ cat > exp << EOF
91+ To dst
92+ ! refs/heads/master:refs/heads/test [remote rejected] (n/a (unpacker error))
93+ EOF
94+
8395test_expect_success ' push with receive.fsckobjects' '
8496 rm -rf dst &&
8597 git init dst &&
@@ -88,7 +100,8 @@ test_expect_success 'push with receive.fsckobjects' '
88100 git config receive.fsckobjects true &&
89101 git config transfer.fsckobjects false
90102 ) &&
91- test_must_fail git push dst master:refs/heads/test
103+ test_must_fail git push --porcelain dst master:refs/heads/test >act &&
104+ test_cmp exp act
92105'
93106
94107test_expect_success ' push with transfer.fsckobjects' '
@@ -98,7 +111,8 @@ test_expect_success 'push with transfer.fsckobjects' '
98111 cd dst &&
99112 git config transfer.fsckobjects true
100113 ) &&
101- test_must_fail git push dst master:refs/heads/test
114+ test_must_fail git push --porcelain dst master:refs/heads/test >act &&
115+ test_cmp exp act
102116'
103117
104118test_done
0 commit comments