aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rwxr-xr-xt/t1004-read-tree-m-u-wf.sh2
-rwxr-xr-xt/t1020-subdirectory.sh6
-rwxr-xr-xt/t3800-mktag.sh4
-rwxr-xr-xt/t5000-tar-tree.sh2
-rwxr-xr-xt/t5600-clone-fail-cleanup.sh2
-rwxr-xr-xt/t5700-clone-reference.sh40
-rwxr-xr-xt/t6023-merge-rename-nocruft.sh42
-rwxr-xr-xt/t9101-git-svn-props.sh2
-rwxr-xr-xt/t9200-git-cvsexportcommit.sh36
-rwxr-xr-xt/test-lib.sh2
10 files changed, 120 insertions, 18 deletions
diff --git a/t/t1004-read-tree-m-u-wf.sh b/t/t1004-read-tree-m-u-wf.sh
index 4f664f6ad..c11420a8b 100755
--- a/t/t1004-read-tree-m-u-wf.sh
+++ b/t/t1004-read-tree-m-u-wf.sh
@@ -87,7 +87,7 @@ test_expect_success 'three-way not complaining on an untracked path in both' '
git-read-tree -m -u branch-point master side
'
-test_expect_success 'three-way not cloberring a working tree file' '
+test_expect_success 'three-way not clobbering a working tree file' '
git reset --hard &&
rm -f file2 subdir/file2 file3 subdir/file3 &&
diff --git a/t/t1020-subdirectory.sh b/t/t1020-subdirectory.sh
index c090c9618..1e8f9e59d 100755
--- a/t/t1020-subdirectory.sh
+++ b/t/t1020-subdirectory.sh
@@ -106,21 +106,21 @@ test_expect_success 'read-tree' '
cmp ../one ../original.one
'
-test_expect_success 'no file/rev ambuguity check inside .git' '
+test_expect_success 'no file/rev ambiguity check inside .git' '
cd $HERE &&
git commit -a -m 1 &&
cd $HERE/.git &&
git show -s HEAD
'
-test_expect_success 'no file/rev ambuguity check inside a bare repo' '
+test_expect_success 'no file/rev ambiguity check inside a bare repo' '
cd $HERE &&
git clone -s --bare .git foo.git &&
cd foo.git && GIT_DIR=. git show -s HEAD
'
# This still does not work as it should...
-: test_expect_success 'no file/rev ambuguity check inside a bare repo' '
+: test_expect_success 'no file/rev ambiguity check inside a bare repo' '
cd $HERE &&
git clone -s --bare .git foo.git &&
cd foo.git && git show -s HEAD
diff --git a/t/t3800-mktag.sh b/t/t3800-mktag.sh
index ede4d4249..7c7e4335d 100755
--- a/t/t3800-mktag.sh
+++ b/t/t3800-mktag.sh
@@ -172,7 +172,7 @@ EOF
check_verify_failure 'verify tag-name check'
############################################################
-# 11. tagger line lable check #1
+# 11. tagger line label check #1
cat >tag.sig <<EOF
object $head
@@ -187,7 +187,7 @@ EOF
check_verify_failure '"tagger" line label check #1'
############################################################
-# 12. tagger line lable check #2
+# 12. tagger line label check #2
cat >tag.sig <<EOF
object $head
diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh
index cf08e9279..ac835fe43 100755
--- a/t/t5000-tar-tree.sh
+++ b/t/t5000-tar-tree.sh
@@ -10,7 +10,7 @@ commit id embedding:
The contents of the repository is compared to the extracted tar
archive. The repository contains simple text files, symlinks and a
- binary file (/bin/sh). Only pathes shorter than 99 characters are
+ binary file (/bin/sh). Only paths shorter than 99 characters are
used.
git-tar-tree applies the commit date to every file in the archive it
diff --git a/t/t5600-clone-fail-cleanup.sh b/t/t5600-clone-fail-cleanup.sh
index 041be04f5..1776b377f 100755
--- a/t/t5600-clone-fail-cleanup.sh
+++ b/t/t5600-clone-fail-cleanup.sh
@@ -36,7 +36,7 @@ test_expect_success \
'git-clone foo bar'
test_expect_success \
- 'successfull clone must leave the directory' \
+ 'successful clone must leave the directory' \
'cd bar'
test_done
diff --git a/t/t5700-clone-reference.sh b/t/t5700-clone-reference.sh
index dd9caad1c..6d4325259 100755
--- a/t/t5700-clone-reference.sh
+++ b/t/t5700-clone-reference.sh
@@ -26,7 +26,7 @@ git prune'
cd "$base_dir"
-test_expect_success 'cloning with reference' \
+test_expect_success 'cloning with reference (-l -s)' \
'git clone -l -s --reference B A C'
cd "$base_dir"
@@ -50,6 +50,28 @@ diff expected current'
cd "$base_dir"
+test_expect_success 'cloning with reference (no -l -s)' \
+'git clone --reference B A D'
+
+cd "$base_dir"
+
+test_expect_success 'existence of info/alternates' \
+'test `wc -l <D/.git/objects/info/alternates` = 1'
+
+cd "$base_dir"
+
+test_expect_success 'pulling from reference' \
+'cd D && git pull ../B'
+
+cd "$base_dir"
+
+test_expect_success 'that reference gets used' \
+'cd D && echo "0 objects, 0 kilobytes" > expected &&
+git count-objects > current &&
+diff expected current'
+
+cd "$base_dir"
+
test_expect_success 'updating origin' \
'cd A &&
echo third > file3 &&
@@ -75,4 +97,20 @@ diff expected current'
cd "$base_dir"
+test_expect_success 'pulling changes from origin' \
+'cd D &&
+git pull origin'
+
+cd "$base_dir"
+
+# the 5 local objects are expected; file3 blob, commit in A to add it
+# and its tree, and 2 are our tree and the merge commit.
+test_expect_success 'check objects expected to exist locally' \
+'cd D &&
+echo "5 objects" > expected &&
+git count-objects | cut -d, -f1 > current &&
+diff expected current'
+
+cd "$base_dir"
+
test_done
diff --git a/t/t6023-merge-rename-nocruft.sh b/t/t6023-merge-rename-nocruft.sh
index 69c66cf6f..65be95fba 100755
--- a/t/t6023-merge-rename-nocruft.sh
+++ b/t/t6023-merge-rename-nocruft.sh
@@ -45,6 +45,7 @@ git add A M &&
git commit -m "initial has A and M" &&
git branch white &&
git branch red &&
+git branch blue &&
git checkout white &&
sed -e "/^g /s/.*/g : white changes a line/" <A >B &&
@@ -58,6 +59,13 @@ echo created by red >R &&
git update-index --add R &&
git commit -m "red creates R" &&
+git checkout blue &&
+sed -e "/^o /s/.*/g : blue changes a line/" <A >B &&
+rm -f A &&
+mv B A &&
+git update-index A &&
+git commit -m "blue modify A" &&
+
git checkout master'
# This test broke in 65ac6e9c3f47807cb603af07a6a9e1a43bc119ae
@@ -94,4 +102,38 @@ test_expect_success 'merge white into red (A->B,M->N)' \
return 0
'
+# This test broke in 8371234ecaaf6e14fe3f2082a855eff1bbd79ae9
+test_expect_success 'merge blue into white (A->B, mod A, A untracked)' \
+'
+ git checkout -b white-blue white &&
+ echo dirty >A &&
+ git merge blue &&
+ git write-tree >/dev/null || {
+ echo "BAD: merge did not complete"
+ return 1
+ }
+
+ test -f A || {
+ echo "BAD: A does not exist in working directory"
+ return 1
+ }
+ test `cat A` = dirty || {
+ echo "BAD: A content is wrong"
+ return 1
+ }
+ test -f B || {
+ echo "BAD: B does not exist in working directory"
+ return 1
+ }
+ test -f N || {
+ echo "BAD: N does not exist in working directory"
+ return 1
+ }
+ test -f M && {
+ echo "BAD: M still exists in working directory"
+ return 1
+ }
+ return 0
+'
+
test_done
diff --git a/t/t9101-git-svn-props.sh b/t/t9101-git-svn-props.sh
index 46fcec50a..a2c4dc324 100755
--- a/t/t9101-git-svn-props.sh
+++ b/t/t9101-git-svn-props.sh
@@ -70,7 +70,7 @@ name='test svn:keywords ignoring'
test_expect_success "$name" \
'git checkout -b mybranch remotes/git-svn &&
echo Hi again >> kw.c &&
- git commit -a -m "test keywoards ignoring" &&
+ git commit -a -m "test keywords ignoring" &&
git-svn set-tree remotes/git-svn..mybranch &&
git pull . remotes/git-svn'
diff --git a/t/t9200-git-cvsexportcommit.sh b/t/t9200-git-cvsexportcommit.sh
index fd0a5549f..4efa0c926 100755
--- a/t/t9200-git-cvsexportcommit.sh
+++ b/t/t9200-git-cvsexportcommit.sh
@@ -169,21 +169,35 @@ test_expect_success \
test "$(echo $(sort "G g/CVS/Entries"|cut -d/ -f2,3,5))" = "with spaces.png/1.2/-kb with spaces.txt/1.2/"
)'
-# This test contains ISO-8859-1 characters
+# Some filesystems mangle pathnames with UTF-8 characters --
+# check and skip
+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) &&
+ test "z$found" = "ztst/$p/day" &&
+ rm -fr tst
+then
+
+# This test contains UTF-8 characters
test_expect_success \
'File with non-ascii file name' \
- 'mkdir -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/å/ä/ö &&
- echo Foo >Å/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/å/ä/ö/gårdetsågårdet.txt &&
- git add Å/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/å/ä/ö/gårdetsågårdet.txt &&
- cp ../test9200a.png Å/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/å/ä/ö/gårdetsågårdet.png &&
- git add Å/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/å/ä/ö/gårdetsågårdet.png &&
- git commit -a -m "Går det så går det" && \
+ 'mkdir -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/å/ä/ö &&
+ echo Foo >Å/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/å/ä/ö/gårdetsågårdet.txt &&
+ git add Å/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/å/ä/ö/gårdetsågårdet.txt &&
+ cp ../test9200a.png Å/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/å/ä/ö/gårdetsågårdet.png &&
+ git add Å/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/å/ä/ö/gårdetsågårdet.png &&
+ git commit -a -m "Går det så går det" && \
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 $(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/"
)'
+fi
+
+rm -fr tst
+
test_expect_success \
'Mismatching patch should fail' \
'date >>"E/newfile5.txt" &&
@@ -197,6 +211,10 @@ test_expect_success \
! git-cvsexportcommit -c $id
)'
+case "$(git repo-config --bool core.filemode)" in
+false)
+ ;;
+*)
test_expect_success \
'Retain execute bit' \
'mkdir G &&
@@ -211,5 +229,7 @@ test_expect_success \
test -x G/on &&
! test -x G/off
)'
+ ;;
+esac
test_done
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 8e3ee6cd7..37822fc13 100755
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -30,6 +30,8 @@ unset GIT_INDEX_FILE
unset GIT_OBJECT_DIRECTORY
unset SHA1_FILE_DIRECTORIES
unset SHA1_FILE_DIRECTORY
+GIT_MERGE_VERBOSITY=5
+export GIT_MERGE_VERBOSITY
export GIT_AUTHOR_EMAIL GIT_AUTHOR_NAME
export GIT_COMMITTER_EMAIL GIT_COMMITTER_NAME
export EDITOR VISUAL