mirror of
https://github.com/git/git.git
synced 2026-03-13 10:23:30 +01:00
Avoid Windows's sort by using the full path of /usr/bin/sort.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -9,7 +9,7 @@ struct cmdname_help
|
||||
|
||||
struct cmdname_help common_cmds[] = {"
|
||||
|
||||
sort <<\EOF |
|
||||
/usr/bin/sort <<\EOF |
|
||||
add
|
||||
apply
|
||||
archive
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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" |
|
||||
|
||||
@@ -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 \
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user