Undo /usr/bin/sort and /usr/bin/find workarounds.

This commit is contained in:
Johannes Sixt
2007-09-09 21:01:15 +02:00
parent cd4ce16f0f
commit b14adeb12d
17 changed files with 34 additions and 34 deletions

View File

@@ -53,7 +53,7 @@ do
shift
;;
esac
git rev-parse --symbolic --tags | /usr/bin/sort |
git rev-parse --symbolic --tags | sort |
while read TAG
do
case "$TAG" in

View File

@@ -285,7 +285,7 @@ yes)
then
# See if we can hardlink and drop "l" if not.
sample_file=$(cd "$repo" && \
/usr/bin/find objects -type f -print | sed -e 1q)
find objects -type f -print | sed -e 1q)
# objects directory should not be empty because
# we are cloning!
test -f "$repo/$sample_file" || exit
@@ -299,7 +299,7 @@ yes)
fi
fi &&
cd "$repo" &&
/usr/bin/find objects -depth -print | cpio -pumd$l "$GIT_DIR/" || exit 1
find objects -depth -print | cpio -pumd$l "$GIT_DIR/" || exit 1
fi
git-ls-remote "$repo" >"$GIT_DIR/CLONE_HEAD" || exit 1
;;
@@ -416,7 +416,7 @@ then
(
test -f "$GIT_DIR/$remote_top/master" && echo "master"
cd "$GIT_DIR/$remote_top" &&
/usr/bin/find . -type f -print | sed -e 's/^\.\///'
find . -type f -print | sed -e 's/^\.\///'
) | (
done=f
while read name

View File

@@ -92,7 +92,7 @@ rsync://* )
head=$(cat "$tmpdir/$head") || exit
esac &&
echo "$head HEAD"
(cd $tmpdir && /usr/bin/find refs -type f) |
(cd $tmpdir && find refs -type f) |
while read path
do
tr -d '\012' <"$tmpdir/$path"
@@ -111,7 +111,7 @@ rsync://* )
fi
;;
esac |
/usr/bin/sort -t ' ' -k 2 |
sort -t ' ' -k 2 |
while read sha1 path
do
case "$sha1" in

View File

@@ -364,13 +364,13 @@ case "$merge_tool" in
esac
if test $# -eq 0 ; then
files=`git ls-files -u | sed -e 's/^[^ ]* //' | /usr/bin/sort -u`
files=`git ls-files -u | sed -e 's/^[^ ]* //' | sort -u`
if test -z "$files" ; then
echo "No files need merging"
exit 0
fi
echo Merging the files: $files
git ls-files -u | sed -e 's/^[^ ]* //' | /usr/bin/sort -u | while read i
git ls-files -u | sed -e 's/^[^ ]* //' | sort -u | while read i
do
printf "\n"
merge_file "$i" < /dev/tty > /dev/tty

View File

@@ -48,7 +48,7 @@ case ",$all_into_one," in
;;
,t,)
if [ -d "$PACKDIR" ]; then
for e in `cd "$PACKDIR" && /usr/bin/find . -type f -name '*.pack' \
for e in `cd "$PACKDIR" && find . -type f -name '*.pack' \
| sed -e 's/^\.\///' -e 's/\.pack$//'`
do
if [ -e "$PACKDIR/$e.keep" ]; then
@@ -105,7 +105,7 @@ then
# We know $existing are all redundant.
if [ -n "$existing" ]
then
sync 2> /dev/null
sync
( cd "$PACKDIR" &&
for e in $existing
do

View File

@@ -50,14 +50,14 @@ test "$no_symlinks" && {
# git init has been done in an empty repository.
# make sure it is empty.
/usr/bin/find .git/objects -type f -print >should-be-empty
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
/usr/bin/find .git/objects -type d -print >full-of-directories
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.' \
'/usr/bin/find path* ! -type d -print | xargs git update-index --add'
'find path* ! -type d -print | xargs git update-index --add'
# Show them and see that matches what we expect.
test_expect_success \
@@ -289,7 +289,7 @@ test_expect_success \
'commit2=$(echo NO | git commit-tree $P -p $commit0 -p $commit0) &&
parent=$(git show --pretty=raw $commit2 |
sed -n -e "s/^parent //p" -e "/^author /q" |
/usr/bin/sort -u) &&
sort -u) &&
test "z$commit0" = "z$parent" &&
numparent=$(git show --pretty=raw $commit2 |
sed -n -e "s/^parent //p" -e "/^author /q" |

View File

@@ -156,6 +156,6 @@ 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' '/usr/bin/find -type f .git/objects/[0-9a-f][0-9a-f]'
test_expect_failure '-> only packed objects' '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
/usr/bin/find path? -ls |
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 &&
/usr/bin/find path? \( -type f -o -type l \) -print |
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 &&
/usr/bin/find *.txt path* \( -type f -o -type l \) -print |
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
/usr/bin/find klibc -type f -print | xargs git update-index --add --
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 && /usr/bin/find .) | /usr/bin/sort >a.lst'
(cd a && find .) | sort >a.lst'
test_expect_success \
'add files to repository' \
'/usr/bin/find a -type f | xargs git update-index --add &&
/usr/bin/find a -type l | xargs git update-index --add &&
'find a -type f | xargs git update-index --add &&
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" \
@@ -87,7 +87,7 @@ test_expect_success \
test_expect_success \
'validate filenames' \
'(cd b/a && /usr/bin/find .) | /usr/bin/sort >b.lst &&
'(cd b/a && find .) | sort >b.lst &&
diff a.lst b.lst'
test_expect_success \
@@ -104,7 +104,7 @@ test_expect_success \
test_expect_success \
'validate filenames with prefix' \
'(cd c/prefix/a && /usr/bin/find .) | /usr/bin/sort >c.lst &&
'(cd c/prefix/a && find .) | sort >c.lst &&
diff a.lst c.lst'
test_expect_success \
@@ -128,7 +128,7 @@ test_expect_success \
test_expect_success \
'validate filenames' \
'(cd d/a && /usr/bin/find .) | /usr/bin/sort >d.lst &&
'(cd d/a && find .) | sort >d.lst &&
diff a.lst d.lst'
test_expect_success \
@@ -145,7 +145,7 @@ test_expect_success \
test_expect_success \
'validate filenames with prefix' \
'(cd e/prefix/a && /usr/bin/find .) | /usr/bin/sort >e.lst &&
'(cd e/prefix/a && 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 && /usr/bin/find objects -type f -print) |
'(cd ../.git && 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 && /usr/bin/find objects -type f -print) |
'(cd ../.git && 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 && /usr/bin/find objects -type f -print) |
'(cd ../.git && find objects -type f -print) |
while read path
do
cmp $path ../.git/$path || {

View File

@@ -10,7 +10,7 @@ test_description='Tests git rev-list --topo-order functionality'
list_duplicates()
{
"$@" | /usr/bin/sort | uniq -d
"$@" | sort | uniq -d
}
date >path0

View File

@@ -65,7 +65,7 @@ test_expect_success 'multi-fetch works on partial urls + paths' "
for i in trunk a b tags/0.1 tags/0.2 tags/0.3; do
git rev-parse --verify refs/remotes/\$i^0 >> refs.out || exit 1;
done &&
test -z \"\`/usr/bin/sort < refs.out | uniq -d\`\" &&
test -z \"\`sort < refs.out | uniq -d\`\" &&
for i in trunk a b tags/0.1 tags/0.2 tags/0.3; do
for j in trunk a b tags/0.1 tags/0.2 tags/0.3; do
if test \$j != \$i; then continue; fi

View File

@@ -30,7 +30,7 @@ exit 1
check_entries () {
# $1 == directory, $2 == expected
grep '^/' "$1/CVS/Entries" | /usr/bin/sort | cut -d/ -f2,3,5 >actual
grep '^/' "$1/CVS/Entries" | sort | cut -d/ -f2,3,5 >actual
if test -z "$2"
then
>expected
@@ -186,7 +186,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=$(/usr/bin/find tst -type f -print) &&
found=$(find tst -type f -print) &&
test "z$found" = "ztst/$p/day" &&
rm -fr tst
then

View File

@@ -880,7 +880,7 @@ INPUT_END
test_expect_success \
'O: blank lines not necessary after other commands' \
'git-fast-import <input &&
test 8 = `/usr/bin/find .git/objects/pack -type f | wc -l` &&
test 8 = `find .git/objects/pack -type f | wc -l` &&
test `git rev-parse refs/tags/O3-2nd` = `git rev-parse O3^` &&
git log --reverse --pretty=oneline O3 | sed s/^.*z// >actual &&
git diff expect actual'