@@ -58,6 +58,11 @@ test_expect_success 'fetch with transfer.fsckobjects' '
58
58
)
59
59
'
60
60
61
+ cat > exp << EOF
62
+ To dst
63
+ ! refs/heads/master:refs/heads/test [remote rejected] (missing necessary objects)
64
+ EOF
65
+
61
66
test_expect_success ' push without strict' '
62
67
rm -rf dst &&
63
68
git init dst &&
@@ -66,7 +71,8 @@ test_expect_success 'push without strict' '
66
71
git config fetch.fsckobjects false &&
67
72
git config transfer.fsckobjects false
68
73
) &&
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
70
76
'
71
77
72
78
test_expect_success ' push with !receive.fsckobjects' '
@@ -77,9 +83,15 @@ test_expect_success 'push with !receive.fsckobjects' '
77
83
git config receive.fsckobjects false &&
78
84
git config transfer.fsckobjects true
79
85
) &&
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
81
88
'
82
89
90
+ cat > exp << EOF
91
+ To dst
92
+ ! refs/heads/master:refs/heads/test [remote rejected] (n/a (unpacker error))
93
+ EOF
94
+
83
95
test_expect_success ' push with receive.fsckobjects' '
84
96
rm -rf dst &&
85
97
git init dst &&
@@ -88,7 +100,8 @@ test_expect_success 'push with receive.fsckobjects' '
88
100
git config receive.fsckobjects true &&
89
101
git config transfer.fsckobjects false
90
102
) &&
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
92
105
'
93
106
94
107
test_expect_success ' push with transfer.fsckobjects' '
@@ -98,7 +111,8 @@ test_expect_success 'push with transfer.fsckobjects' '
98
111
cd dst &&
99
112
git config transfer.fsckobjects true
100
113
) &&
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
102
116
'
103
117
104
118
test_done
0 commit comments