@@ -271,7 +271,21 @@ if [ $VERBOSE -eq 1 ]; then
271
271
fi
272
272
# Concatenate archives into a super-archive.
273
273
if [ $SEPARATE -eq 0 -o " -" == " $OUT_FILE " ]; then
274
- if [ $FORMAT == ' tar.gz' ]; then
274
+ cmd=$( git config --get " tar.$FORMAT .command" || true)
275
+ if [ $FORMAT == ' tar' ]; then
276
+ sed -e ' 1d' $TMPFILE | while read file; do
277
+ $TARCMD --concatenate -f " $superfile " " $file " && rm -f " $file "
278
+ done
279
+ elif [ -n " $cmd " ]; then
280
+ superfile_=${superfile% .$FORMAT } .tar
281
+ $cmd -d < " $superfile " > " $superfile_ " && rm -f " $superfile "
282
+ sed -e ' 1d' $TMPFILE | while read file; do
283
+ file_=${file% .$FORMAT } .tar
284
+ $cmd -d < " $file " > " $file_ " && rm -f " $file "
285
+ $TARCMD --concatenate -f " $superfile_ " " $file_ " && rm -f " $file_ "
286
+ done
287
+ $cmd < " $superfile_ " > " $superfile " && rm -f " $superfile_ "
288
+ elif [ $FORMAT == ' tar.gz' ]; then
275
289
gunzip $superfile
276
290
superfile=${superfile: 0: -3} # Remove '.gz'
277
291
sed -e ' 1d' $TMPFILE | while read file; do
@@ -281,10 +295,6 @@ if [ $SEPARATE -eq 0 -o "-" == "$OUT_FILE" ]; then
281
295
done
282
296
gzip $superfile
283
297
superfile=$superfile .gz
284
- elif [ $FORMAT == ' tar' ]; then
285
- sed -e ' 1d' $TMPFILE | while read file; do
286
- $TARCMD --concatenate -f " $superfile " " $file " && rm -f " $file "
287
- done
288
298
elif [ $FORMAT == ' zip' ]; then
289
299
sed -e ' 1d' $TMPFILE | while read file; do
290
300
# zip incorrectly stores the full path, so cd and then grow
0 commit comments