@@ -112,19 +112,28 @@ test_expect_success 'setup master repo' '
112
112
create_commits_in "$master_repo" A B C D E F G H I J K L M N O P Q R
113
113
'
114
114
115
+ test_expect_success ' master: pack-redundant works with no packfile' '
116
+ (
117
+ cd "$master_repo" &&
118
+ cat >expect <<-EOF &&
119
+ fatal: Zero packs found!
120
+ EOF
121
+ test_must_fail git pack-redundant --all >actual 2>&1 &&
122
+ test_cmp expect actual
123
+ )
124
+ '
125
+
115
126
# ############################################################################
116
127
# Chart of packs and objects for this test case
117
128
#
118
129
# | T A B C D E F G H I J K L M N O P Q R
119
130
# ----+--------------------------------------
120
131
# P1 | x x x x x x x x
121
- # P2 | x x x x x x x
122
- # P3 | x x x x x x
123
132
# ----+--------------------------------------
124
- # ALL | x x x x x x x x x x x x x x x
133
+ # ALL | x x x x x x x x
125
134
#
126
135
# ############################################################################
127
- test_expect_success ' master: no redundant for pack 1, 2, 3 ' '
136
+ test_expect_success ' master: pack- redundant works with one packfile ' '
128
137
create_pack_in "$master_repo" P1 <<-EOF &&
129
138
$T
130
139
$A
@@ -135,6 +144,26 @@ test_expect_success 'master: no redundant for pack 1, 2, 3' '
135
144
$F
136
145
$R
137
146
EOF
147
+ (
148
+ cd "$master_repo" &&
149
+ git pack-redundant --all >out &&
150
+ test_must_be_empty out
151
+ )
152
+ '
153
+
154
+ # ############################################################################
155
+ # Chart of packs and objects for this test case
156
+ #
157
+ # | T A B C D E F G H I J K L M N O P Q R
158
+ # ----+--------------------------------------
159
+ # P1 | x x x x x x x x
160
+ # P2 | x x x x x x x
161
+ # P3 | x x x x x x
162
+ # ----+--------------------------------------
163
+ # ALL | x x x x x x x x x x x x x x x
164
+ #
165
+ # ############################################################################
166
+ test_expect_success ' master: no redundant for pack 1, 2, 3' '
138
167
create_pack_in "$master_repo" P2 <<-EOF &&
139
168
$B
140
169
$C
0 commit comments