Avoid Windows's find by using the full path of /usr/bin/find.

This commit is contained in:
Johannes Sixt
2007-01-08 13:23:22 +01:00
parent d34a3a1a61
commit c65b79715c
12 changed files with 24 additions and 24 deletions

View File

@@ -224,7 +224,7 @@ yes,yes)
no)
# See if we can hardlink and drop "l" if not.
sample_file=$(cd "$repo" && \
find objects -type f -print | sed -e 1q)
/usr/bin/find objects -type f -print | sed -e 1q)
# objects directory should not be empty since we are cloning!
test -f "$repo/$sample_file" || exit
@@ -236,7 +236,7 @@ yes,yes)
fi &&
rm -f "$GIT_DIR/objects/sample" &&
cd "$repo" &&
find objects -depth -print | cpio -pumd$l "$GIT_DIR/" || exit 1
/usr/bin/find objects -depth -print | cpio -pumd$l "$GIT_DIR/" || exit 1
;;
yes)
mkdir -p "$GIT_DIR/objects/info"
@@ -354,7 +354,7 @@ then
(
test -f "$GIT_DIR/$remote_top/master" && echo "master"
cd "$GIT_DIR/$remote_top" &&
find . -type f -print | sed -e 's/^\.\///'
/usr/bin/find . -type f -print | sed -e 's/^\.\///'
) | (
done=f
while read name

View File

@@ -79,7 +79,7 @@ rsync://* )
head=$(cat "$tmpdir/$head") || exit
esac &&
echo "$head HEAD"
(cd $tmpdir && find refs -type f) |
(cd $tmpdir && /usr/bin/find refs -type f) |
while read path
do
cat "$tmpdir/$path" | tr -d '\012'

View File

@@ -46,7 +46,7 @@ case ",$all_into_one," in
;;
,t,)
if [ -d "$PACKDIR" ]; then
for e in `cd "$PACKDIR" && find . -type f -name '*.pack' \
for e in `cd "$PACKDIR" && /usr/bin/find . -type f -name '*.pack' \
| sed -e 's/^\.\///' -e 's/\.pack$//'`
do
if [ -e "$PACKDIR/$e.keep" ]; then

View File

@@ -50,14 +50,14 @@ test "$no_symlinks" && {
# git-init has been done in an empty repository.
# make sure it is empty.
find .git/objects -type f -print >should-be-empty
/usr/bin/find .git/objects -type f -print >should-be-empty
test_expect_success \
'.git/objects should be empty after git-init in an empty repo.' \
'cmp -s /dev/null should-be-empty'
# also it should have 2 subdirectories; no fan-out anymore, pack, and info.
# 3 is counting "objects" itself
find .git/objects -type d -print >full-of-directories
/usr/bin/find .git/objects -type d -print >full-of-directories
test_expect_success \
'.git/objects should have 3 subdirectories.' \
'test $(wc -l < full-of-directories) = 3'
@@ -112,7 +112,7 @@ do
done
test_expect_success \
'adding various types of objects with git-update-index --add.' \
'find path* ! -type d -print | xargs git-update-index --add'
'/usr/bin/find path* ! -type d -print | xargs git-update-index --add'
# Show them and see that matches what we expect.
test_expect_success \

View File

@@ -156,7 +156,7 @@ test_expect_success 'git show-branch' 'cmp show-branch2.expect show-branch2.outp
test_expect_success 'git repack' 'git repack'
test_expect_success 'git prune-packed' 'git prune-packed'
test_expect_failure '-> only packed objects' 'find -type f .git/objects/[0-9a-f][0-9a-f]'
test_expect_failure '-> only packed objects' '/usr/bin/find -type f .git/objects/[0-9a-f][0-9a-f]'
test_done

View File

@@ -23,7 +23,7 @@ the symlink path1 and create directory path1 and file path1/file1.
show_files() {
# show filesystem files, just [-dl] for type and name
find path? -ls |
/usr/bin/find path? -ls |
sed -e 's/^[0-9]* * [0-9]* * \([-bcdl]\)[^ ]* *[0-9]* *[^ ]* *[^ ]* *[0-9]* [A-Z][a-z][a-z] [0-9][0-9] [^ ]* /fs: \1 /'
# what's in the cache, just mode and name
git-ls-files --stage |

View File

@@ -38,7 +38,7 @@ test_expect_success \
echo Lo >path2/foo &&
ln -s ../path1 path2/bazbo &&
echo Mi >path2/baz/b &&
find path? \( -type f -o -type l \) -print |
/usr/bin/find path? \( -type f -o -type l \) -print |
xargs git-update-index --add &&
tree=`git-write-tree` &&
echo $tree'

View File

@@ -34,7 +34,7 @@ test_expect_success \
mkdir path3 &&
echo 111 >path3/1.txt &&
echo 222 >path3/2.txt &&
find *.txt path* \( -type f -o -type l \) -print |
/usr/bin/find *.txt path* \( -type f -o -type l \) -print |
xargs git-update-index --add &&
tree=`git-write-tree` &&
echo $tree'

View File

@@ -115,7 +115,7 @@ rename to include/arch/m32r/klibc/archsetjmp.h
+#endif /* _KLIBC_ARCHSETJMP_H */
EOF
find klibc -type f -print | xargs git-update-index --add --
/usr/bin/find klibc -type f -print | xargs git-update-index --add --
test_expect_success 'check rename/copy patch' 'git-apply --check patch'

View File

@@ -45,12 +45,12 @@ test_expect_success \
(p=long_path_to_a_file && cd a &&
for depth in 1 2 3 4 5; do mkdir $p && cd $p; done &&
echo text >file_with_long_path) &&
(cd a && find .) | sort >a.lst'
(cd a && /usr/bin/find .) | sort >a.lst'
test_expect_success \
'add files to repository' \
'find a -type f | xargs git-update-index --add &&
find a -type l | xargs git-update-index --add &&
'/usr/bin/find a -type f | xargs git-update-index --add &&
/usr/bin/find a -type l | xargs git-update-index --add &&
treeid=`git-write-tree` &&
echo $treeid >treeid &&
git-update-ref HEAD $(TZ=GMT GIT_COMMITTER_DATE="2005-05-27 22:00:00" \
@@ -79,7 +79,7 @@ test_expect_success \
test_expect_success \
'validate filenames' \
'(cd b/a && find .) | sort >b.lst &&
'(cd b/a && /usr/bin/find .) | sort >b.lst &&
diff a.lst b.lst'
test_expect_success \
@@ -96,7 +96,7 @@ test_expect_success \
test_expect_success \
'validate filenames with prefix' \
'(cd c/prefix/a && find .) | sort >c.lst &&
'(cd c/prefix/a && /usr/bin/find .) | sort >c.lst &&
diff a.lst c.lst'
test_expect_success \
@@ -113,7 +113,7 @@ test_expect_success \
test_expect_success \
'validate filenames' \
'(cd d/a && find .) | sort >d.lst &&
'(cd d/a && /usr/bin/find .) | sort >d.lst &&
diff a.lst d.lst'
test_expect_success \
@@ -130,7 +130,7 @@ test_expect_success \
test_expect_success \
'validate filenames with prefix' \
'(cd e/prefix/a && find .) | sort >e.lst &&
'(cd e/prefix/a && /usr/bin/find .) | sort >e.lst &&
diff a.lst e.lst'
test_expect_success \

View File

@@ -75,7 +75,7 @@ cd "$TRASH/.git2"
test_expect_success \
'check unpack without delta' \
'(cd ../.git && find objects -type f -print) |
'(cd ../.git && /usr/bin/find objects -type f -print) |
while read path
do
cmp $path ../.git/$path || {
@@ -105,7 +105,7 @@ unset GIT_OBJECT_DIRECTORY
cd "$TRASH/.git2"
test_expect_success \
'check unpack with REF_DELTA' \
'(cd ../.git && find objects -type f -print) |
'(cd ../.git && /usr/bin/find objects -type f -print) |
while read path
do
cmp $path ../.git/$path || {
@@ -135,7 +135,7 @@ unset GIT_OBJECT_DIRECTORY
cd "$TRASH/.git2"
test_expect_success \
'check unpack with OFS_DELTA' \
'(cd ../.git && find objects -type f -print) |
'(cd ../.git && /usr/bin/find objects -type f -print) |
while read path
do
cmp $path ../.git/$path || {

View File

@@ -174,7 +174,7 @@ test_expect_success \
if p="Å/goo/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/å/ä/ö" &&
mkdir -p "tst/$p" &&
date >"tst/$p/day" &&
found=$(find tst -type f -print) &&
found=$(/usr/bin/find tst -type f -print) &&
test "z$found" = "ztst/$p/day" &&
rm -fr tst
then