diff --git a/contrib/examples/git-tag.sh b/contrib/examples/git-tag.sh index 181b9a7e97..5ee3f50a3c 100755 --- a/contrib/examples/git-tag.sh +++ b/contrib/examples/git-tag.sh @@ -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 diff --git a/git-clone.sh b/git-clone.sh index e262f77136..6de44cde1f 100755 --- a/git-clone.sh +++ b/git-clone.sh @@ -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 diff --git a/git-ls-remote.sh b/git-ls-remote.sh index 0d7508407b..984cef4dd0 100755 --- a/git-ls-remote.sh +++ b/git-ls-remote.sh @@ -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 diff --git a/git-mergetool.sh b/git-mergetool.sh index e6bbb6bbd6..47a80553ad 100755 --- a/git-mergetool.sh +++ b/git-mergetool.sh @@ -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 diff --git a/git-repack.sh b/git-repack.sh index a8f44097e0..156c5e8f4a 100755 --- a/git-repack.sh +++ b/git-repack.sh @@ -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 diff --git a/t/t0000-basic.sh b/t/t0000-basic.sh index a213268cd6..0d8c4b18ba 100755 --- a/t/t0000-basic.sh +++ b/t/t0000-basic.sh @@ -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" | diff --git a/t/t1200-tutorial.sh b/t/t1200-tutorial.sh index 5cd9c48ddf..991d3c5e9c 100755 --- a/t/t1200-tutorial.sh +++ b/t/t1200-tutorial.sh @@ -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 diff --git a/t/t2001-checkout-cache-clash.sh b/t/t2001-checkout-cache-clash.sh index 45b4bc47d6..c1e236e932 100755 --- a/t/t2001-checkout-cache-clash.sh +++ b/t/t2001-checkout-cache-clash.sh @@ -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 | diff --git a/t/t3100-ls-tree-restrict.sh b/t/t3100-ls-tree-restrict.sh index 4794fdd9eb..40c6f1d31f 100755 --- a/t/t3100-ls-tree-restrict.sh +++ b/t/t3100-ls-tree-restrict.sh @@ -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' diff --git a/t/t3101-ls-tree-dirname.sh b/t/t3101-ls-tree-dirname.sh index e6ebe51d1d..39fe2676dc 100755 --- a/t/t3101-ls-tree-dirname.sh +++ b/t/t3101-ls-tree-dirname.sh @@ -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' diff --git a/t/t4112-apply-renames.sh b/t/t4112-apply-renames.sh index fcdf99d65a..70a1859503 100755 --- a/t/t4112-apply-renames.sh +++ b/t/t4112-apply-renames.sh @@ -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' diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh index a76c0f632b..f17bc3ac0b 100755 --- a/t/t5000-tar-tree.sh +++ b/t/t5000-tar-tree.sh @@ -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 \ diff --git a/t/t5300-pack-object.sh b/t/t5300-pack-object.sh index a232f41edf..9a81d84106 100755 --- a/t/t5300-pack-object.sh +++ b/t/t5300-pack-object.sh @@ -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 || { diff --git a/t/t6003-rev-list-topo-order.sh b/t/t6003-rev-list-topo-order.sh index b507bd8078..5daa0be8cc 100755 --- a/t/t6003-rev-list-topo-order.sh +++ b/t/t6003-rev-list-topo-order.sh @@ -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 diff --git a/t/t9107-git-svn-migrate.sh b/t/t9107-git-svn-migrate.sh index e4b030b93e..67fdf7023f 100755 --- a/t/t9107-git-svn-migrate.sh +++ b/t/t9107-git-svn-migrate.sh @@ -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 diff --git a/t/t9200-git-cvsexportcommit.sh b/t/t9200-git-cvsexportcommit.sh index 9b271f2729..910c584f24 100755 --- a/t/t9200-git-cvsexportcommit.sh +++ b/t/t9200-git-cvsexportcommit.sh @@ -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 diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh index a64f78f5a0..0595041af5 100755 --- a/t/t9300-fast-import.sh +++ b/t/t9300-fast-import.sh @@ -880,7 +880,7 @@ INPUT_END test_expect_success \ 'O: blank lines not necessary after other commands' \ 'git-fast-import actual && git diff expect actual'