Skip to content

Commit eacde87

Browse files
committed
Teach diffall to handle working copy changes without using 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>
1 parent 79d2dc7 commit eacde87

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

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"
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)