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>
This commit is contained in:
Tim Henigan 2012-03-14 12:38:04 -04:00 committed by Junio C Hamano
parent c5770f7906
commit e33e01d077

View File

@ -202,10 +202,14 @@ then
fi
done < "$tmp/filelist"
else
# Mac users have gnutar rather than tar
(tar --ignore-failed-read -c -T "$tmp/filelist" | (cd "$tmp/$right_dir" && tar -x)) || {
gnutar --ignore-failed-read -c -T "$tmp/filelist" | (cd "$tmp/$right_dir" && gnutar -x)
}
while read name
do
if test -e "$name"
then
mkdir -p "$tmp/$right_dir/$(dirname "$name")"
cp "$name" "$tmp/$right_dir/$name"
fi
done < "$tmp/filelist"
fi
# Populate the tmp/left_dir directory with the files to be compared