Skip to content

Commit e33e01d

Browse files
thenigangitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent c5770f7 commit e33e01d

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

contrib/diffall/git-diffall

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,10 +202,14 @@ then
202202
fi
203203
done < "$tmp/filelist"
204204
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"
209213
fi
210214

211215
# Populate the tmp/left_dir directory with the files to be compared

0 commit comments

Comments
 (0)