contrib/diffall: eliminate use of tar
The 'tar' utility is not available on all platforms (some only support 'gnutar'). An earlier commit created a work-around for this problem, but a better solution is to eliminate the use of 'tar' completely. Signed-off-by: Tim Henigan <tim.henigan@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Tim Henigan committed
Mar 14, 2012 at 12:38 UTC
e33e01d07703d0c2c662c30e745dc93b543641c0
1 file changed
+8
-4
contrib/diffall/git-diffall
+8
-4
@@ -202,10 +202,14 @@ then
202
fi
203
done < "$tmp/filelist"
204
else
205
- # Mac users have gnutar rather than tar
206
- (tar --ignore-failed-read -c -T "$tmp/filelist" | (cd "$tmp/$right_dir" && tar -x)) || {
207
- gnutar --ignore-failed-read -c -T "$tmp/filelist" | (cd "$tmp/$right_dir" && gnutar -x)
208
- }
205
+ while read name
206
+ do
207
+ if test -e "$name"
208
+ then
209
+ mkdir -p "$tmp/$right_dir/$(dirname "$name")"
210
+ cp "$name" "$tmp/$right_dir/$name"
211
+ fi
212
+ done < "$tmp/filelist"
213
fi
214
215
# Populate the tmp/left_dir directory with the files to be compared