Skip to content

Commit

Permalink
contrib/diffall: eliminate use of tar
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tim Henigan authored and Junio C Hamano committed Mar 14, 2012
1 parent c5770f7 commit e33e01d
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions contrib/diffall/git-diffall
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e33e01d

Please sign in to comment.