diff --git a/check-builtins.sh b/check-builtins.sh index d6fe6cf174..cd09309838 100755 --- a/check-builtins.sh +++ b/check-builtins.sh @@ -9,7 +9,7 @@ EOF } | make -f - sayIt 2>/dev/null | sed -n -e 's/.*XXX \(.*\) YYY.*/\1/p' | -sort | +/usr/bin/sort | { bad=0 while read builtin diff --git a/generate-cmdlist.sh b/generate-cmdlist.sh index 975777f05e..a0a938aa08 100755 --- a/generate-cmdlist.sh +++ b/generate-cmdlist.sh @@ -9,7 +9,7 @@ struct cmdname_help struct cmdname_help common_cmds[] = {" -sort <<\EOF | +/usr/bin/sort <<\EOF | add apply archive diff --git a/git-ls-remote.sh b/git-ls-remote.sh index 145fc38c79..7bc2ab884f 100755 --- a/git-ls-remote.sh +++ b/git-ls-remote.sh @@ -98,7 +98,7 @@ rsync://* ) fi ;; esac | -sort -t ' ' -k 2 | +/usr/bin/sort -t ' ' -k 2 | while read sha1 path do case "$sha1" in diff --git a/git-mergetool.sh b/git-mergetool.sh index e62351bcba..7d1df52ac7 100755 --- a/git-mergetool.sh +++ b/git-mergetool.sh @@ -344,13 +344,13 @@ case "$merge_tool" in esac if test $# -eq 0 ; then - files=`git ls-files -u | sed -e 's/^[^ ]* //' | sort -u` + files=`git ls-files -u | sed -e 's/^[^ ]* //' | /usr/bin/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/^[^ ]* //' | sort -u | while read i + git ls-files -u | sed -e 's/^[^ ]* //' | /usr/bin/sort -u | while read i do printf "\n" merge_file "$i" < /dev/tty > /dev/tty diff --git a/git-tag.sh b/git-tag.sh index 4a0a7b6607..47d7c0bb16 100755 --- a/git-tag.sh +++ b/git-tag.sh @@ -32,7 +32,7 @@ do set x . ;; esac shift - git rev-parse --symbolic --tags | sort | grep "$@" + git rev-parse --symbolic --tags | /usr/bin/sort | grep "$@" exit $? ;; -m) diff --git a/t/t0000-basic.sh b/t/t0000-basic.sh index 66898afc4f..534cad51c8 100755 --- a/t/t0000-basic.sh +++ b/t/t0000-basic.sh @@ -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" | - sort -u) && + /usr/bin/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/t5000-tar-tree.sh b/t/t5000-tar-tree.sh index f46ea1542e..766ac165c2 100755 --- a/t/t5000-tar-tree.sh +++ b/t/t5000-tar-tree.sh @@ -45,7 +45,7 @@ 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 .) | sort >a.lst' + (cd a && /usr/bin/find .) | /usr/bin/sort >a.lst' test_expect_success \ 'add files to repository' \ @@ -79,7 +79,7 @@ test_expect_success \ test_expect_success \ 'validate filenames' \ - '(cd b/a && /usr/bin/find .) | sort >b.lst && + '(cd b/a && /usr/bin/find .) | /usr/bin/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 && /usr/bin/find .) | sort >c.lst && + '(cd c/prefix/a && /usr/bin/find .) | /usr/bin/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 && /usr/bin/find .) | sort >d.lst && + '(cd d/a && /usr/bin/find .) | /usr/bin/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 && /usr/bin/find .) | sort >e.lst && + '(cd e/prefix/a && /usr/bin/find .) | /usr/bin/sort >e.lst && diff a.lst e.lst' test_expect_success \ diff --git a/t/t6003-rev-list-topo-order.sh b/t/t6003-rev-list-topo-order.sh index d99a9ad39e..cbf46dec42 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() { - "$@" | sort | uniq -d + "$@" | /usr/bin/sort | uniq -d } date >path0 diff --git a/t/t9107-git-svn-migrate.sh b/t/t9107-git-svn-migrate.sh index dc2afdaa45..2665b57de9 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 \"\`sort < refs.out | uniq -d\`\" && + test -z \"\`/usr/bin/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 e91b5a8437..8e5722245d 100755 --- a/t/t9200-git-cvsexportcommit.sh +++ b/t/t9200-git-cvsexportcommit.sh @@ -43,10 +43,10 @@ test_expect_success \ id=$(git rev-list --max-count=1 HEAD) && (cd "$CVSWORK" && git cvsexportcommit -c $id && - test "$(echo $(sort A/CVS/Entries|cut -d/ -f2,3,5))" = "newfile1.txt/1.1/" && - test "$(echo $(sort B/CVS/Entries|cut -d/ -f2,3,5))" = "newfile2.txt/1.1/" && - test "$(echo $(sort C/CVS/Entries|cut -d/ -f2,3,5))" = "newfile3.png/1.1/-kb" && - test "$(echo $(sort D/CVS/Entries|cut -d/ -f2,3,5))" = "newfile4.png/1.1/-kb" && + test "$(echo $(/usr/bin/sort A/CVS/Entries|cut -d/ -f2,3,5))" = "newfile1.txt/1.1/" && + test "$(echo $(/usr/bin/sort B/CVS/Entries|cut -d/ -f2,3,5))" = "newfile2.txt/1.1/" && + test "$(echo $(/usr/bin/sort C/CVS/Entries|cut -d/ -f2,3,5))" = "newfile3.png/1.1/-kb" && + test "$(echo $(/usr/bin/sort D/CVS/Entries|cut -d/ -f2,3,5))" = "newfile4.png/1.1/-kb" && diff A/newfile1.txt ../A/newfile1.txt && diff B/newfile2.txt ../B/newfile2.txt && diff C/newfile3.png ../C/newfile3.png && @@ -67,12 +67,12 @@ test_expect_success \ id=$(git rev-list --max-count=1 HEAD) && (cd "$CVSWORK" && git cvsexportcommit -c $id && - test "$(echo $(sort A/CVS/Entries|cut -d/ -f2,3,5))" = "newfile1.txt/1.2/" && - test "$(echo $(sort B/CVS/Entries|cut -d/ -f2,3,5))" = "" && - test "$(echo $(sort C/CVS/Entries|cut -d/ -f2,3,5))" = "" && - test "$(echo $(sort D/CVS/Entries|cut -d/ -f2,3,5))" = "newfile4.png/1.2/-kb" && - test "$(echo $(sort E/CVS/Entries|cut -d/ -f2,3,5))" = "newfile5.txt/1.1/" && - test "$(echo $(sort F/CVS/Entries|cut -d/ -f2,3,5))" = "newfile6.png/1.1/-kb" && + test "$(echo $(/usr/bin/sort A/CVS/Entries|cut -d/ -f2,3,5))" = "newfile1.txt/1.2/" && + test "$(echo $(/usr/bin/sort B/CVS/Entries|cut -d/ -f2,3,5))" = "" && + test "$(echo $(/usr/bin/sort C/CVS/Entries|cut -d/ -f2,3,5))" = "" && + test "$(echo $(/usr/bin/sort D/CVS/Entries|cut -d/ -f2,3,5))" = "newfile4.png/1.2/-kb" && + test "$(echo $(/usr/bin/sort E/CVS/Entries|cut -d/ -f2,3,5))" = "newfile5.txt/1.1/" && + test "$(echo $(/usr/bin/sort F/CVS/Entries|cut -d/ -f2,3,5))" = "newfile6.png/1.1/-kb" && diff A/newfile1.txt ../A/newfile1.txt && diff D/newfile4.png ../D/newfile4.png && diff E/newfile5.txt ../E/newfile5.txt && @@ -115,12 +115,12 @@ test_expect_success \ id=$(git rev-list --max-count=1 HEAD) && (cd "$CVSWORK" && git cvsexportcommit -c $id && - test "$(echo $(sort A/CVS/Entries|cut -d/ -f2,3,5))" = "newfile1.txt/1.2/" && - test "$(echo $(sort B/CVS/Entries|cut -d/ -f2,3,5))" = "" && - test "$(echo $(sort C/CVS/Entries|cut -d/ -f2,3,5))" = "" && - test "$(echo $(sort D/CVS/Entries|cut -d/ -f2,3,5))" = "" && - test "$(echo $(sort E/CVS/Entries|cut -d/ -f2,3,5))" = "newfile5.txt/1.1/" && - test "$(echo $(sort F/CVS/Entries|cut -d/ -f2,3,5))" = "newfile6.png/1.1/-kb" && + test "$(echo $(/usr/bin/sort A/CVS/Entries|cut -d/ -f2,3,5))" = "newfile1.txt/1.2/" && + test "$(echo $(/usr/bin/sort B/CVS/Entries|cut -d/ -f2,3,5))" = "" && + test "$(echo $(/usr/bin/sort C/CVS/Entries|cut -d/ -f2,3,5))" = "" && + test "$(echo $(/usr/bin/sort D/CVS/Entries|cut -d/ -f2,3,5))" = "" && + test "$(echo $(/usr/bin/sort E/CVS/Entries|cut -d/ -f2,3,5))" = "newfile5.txt/1.1/" && + test "$(echo $(/usr/bin/sort F/CVS/Entries|cut -d/ -f2,3,5))" = "newfile6.png/1.1/-kb" && diff A/newfile1.txt ../A/newfile1.txt && diff E/newfile5.txt ../E/newfile5.txt && diff F/newfile6.png ../F/newfile6.png @@ -133,12 +133,12 @@ test_expect_success \ id=$(git rev-list --max-count=1 HEAD) && (cd "$CVSWORK" && git cvsexportcommit -c $id && - test "$(echo $(sort A/CVS/Entries|cut -d/ -f2,3,5))" = "" && - test "$(echo $(sort B/CVS/Entries|cut -d/ -f2,3,5))" = "" && - test "$(echo $(sort C/CVS/Entries|cut -d/ -f2,3,5))" = "" && - test "$(echo $(sort D/CVS/Entries|cut -d/ -f2,3,5))" = "" && - test "$(echo $(sort E/CVS/Entries|cut -d/ -f2,3,5))" = "newfile5.txt/1.1/" && - test "$(echo $(sort F/CVS/Entries|cut -d/ -f2,3,5))" = "newfile6.png/1.1/-kb" && + test "$(echo $(/usr/bin/sort A/CVS/Entries|cut -d/ -f2,3,5))" = "" && + test "$(echo $(/usr/bin/sort B/CVS/Entries|cut -d/ -f2,3,5))" = "" && + test "$(echo $(/usr/bin/sort C/CVS/Entries|cut -d/ -f2,3,5))" = "" && + test "$(echo $(/usr/bin/sort D/CVS/Entries|cut -d/ -f2,3,5))" = "" && + test "$(echo $(/usr/bin/sort E/CVS/Entries|cut -d/ -f2,3,5))" = "newfile5.txt/1.1/" && + test "$(echo $(/usr/bin/sort F/CVS/Entries|cut -d/ -f2,3,5))" = "newfile6.png/1.1/-kb" && diff E/newfile5.txt ../E/newfile5.txt && diff F/newfile6.png ../F/newfile6.png )' @@ -154,7 +154,7 @@ test_expect_success \ id=$(git rev-list --max-count=1 HEAD) && (cd "$CVSWORK" && git-cvsexportcommit -c $id && - test "$(echo $(sort "G g/CVS/Entries"|cut -d/ -f2,3,5))" = "with spaces.png/1.1/-kb with spaces.txt/1.1/" + test "$(echo $(/usr/bin/sort "G g/CVS/Entries"|cut -d/ -f2,3,5))" = "with spaces.png/1.1/-kb with spaces.txt/1.1/" )' test_expect_success \ @@ -166,7 +166,7 @@ test_expect_success \ id=$(git rev-list --max-count=1 HEAD) && (cd "$CVSWORK" && git-cvsexportcommit -c $id - test "$(echo $(sort "G g/CVS/Entries"|cut -d/ -f2,3,5))" = "with spaces.png/1.2/-kb with spaces.txt/1.2/" + test "$(echo $(/usr/bin/sort "G g/CVS/Entries"|cut -d/ -f2,3,5))" = "with spaces.png/1.2/-kb with spaces.txt/1.2/" )' # Some filesystems mangle pathnames with UTF-8 characters -- @@ -191,7 +191,7 @@ test_expect_success \ id=$(git rev-list --max-count=1 HEAD) && (cd "$CVSWORK" && git-cvsexportcommit -v -c $id && - test "$(echo $(sort Å/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/å/ä/ö/CVS/Entries|cut -d/ -f2,3,5))" = "gårdetsågårdet.png/1.1/-kb gårdetsågårdet.txt/1.1/" + test "$(echo $(/usr/bin/sortsort Å/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/å/ä/ö/CVS/Entries|cut -d/ -f2,3,5))" = "gårdetsågårdet.png/1.1/-kb gårdetsågårdet.txt/1.1/" )' fi