diff options
Diffstat (limited to 't')
-rwxr-xr-x | t/t4015-diff-whitespace.sh | 9 | ||||
-rwxr-xr-x | t/t5100-mailinfo.sh | 2 | ||||
-rw-r--r-- | t/t5100/info0009 | 5 | ||||
-rw-r--r-- | t/t5100/msg0009 | 2 | ||||
-rw-r--r-- | t/t5100/patch0009 | 13 | ||||
-rw-r--r-- | t/t5100/sample.mbox | 23 | ||||
-rwxr-xr-x | t/t7003-filter-branch.sh | 14 | ||||
-rwxr-xr-x | t/t7502-status.sh | 21 |
8 files changed, 88 insertions, 1 deletions
diff --git a/t/t4015-diff-whitespace.sh b/t/t4015-diff-whitespace.sh index d30169fbd..83c54b747 100755 --- a/t/t4015-diff-whitespace.sh +++ b/t/t4015-diff-whitespace.sh @@ -326,4 +326,13 @@ test_expect_success 'check tabs and spaces as indentation (indent-with-non-tab: ! git diff --check ' + +test_expect_success 'line numbers in --check output are correct' ' + + echo "" > x && + echo "foo(); " >> x && + git diff --check | grep "x:2:" + +' + test_done diff --git a/t/t5100-mailinfo.sh b/t/t5100-mailinfo.sh index 9b1a74542..d6c55c115 100755 --- a/t/t5100-mailinfo.sh +++ b/t/t5100-mailinfo.sh @@ -11,7 +11,7 @@ test_expect_success 'split sample box' \ 'git mailsplit -o. ../t5100/sample.mbox >last && last=`cat last` && echo total is $last && - test `cat last` = 8' + test `cat last` = 9' for mail in `echo 00*` do diff --git a/t/t5100/info0009 b/t/t5100/info0009 new file mode 100644 index 000000000..2a66321c8 --- /dev/null +++ b/t/t5100/info0009 @@ -0,0 +1,5 @@ +Author: F U Bar +Email: f.u.bar@example.com +Subject: updates +Date: Mon, 17 Sep 2001 00:00:00 +0900 + diff --git a/t/t5100/msg0009 b/t/t5100/msg0009 new file mode 100644 index 000000000..9ffe13148 --- /dev/null +++ b/t/t5100/msg0009 @@ -0,0 +1,2 @@ +This is to fix diff-format documentation. + diff --git a/t/t5100/patch0009 b/t/t5100/patch0009 new file mode 100644 index 000000000..65615c34a --- /dev/null +++ b/t/t5100/patch0009 @@ -0,0 +1,13 @@ +diff --git a/Documentation/diff-format.txt b/Documentation/diff-format.txt +index b426a14..97756ec 100644 +--- a/Documentation/diff-format.txt ++++ b/Documentation/diff-format.txt +@@ -81,7 +81,7 @@ The "diff" formatting options can be customized via the + environment variable 'GIT_DIFF_OPTS'. For example, if you + prefer context diff: + +- GIT_DIFF_OPTS=-c git-diff-index -p $(cat .git/HEAD) ++ GIT_DIFF_OPTS=-c git-diff-index -p HEAD + + + 2. When the environment variable 'GIT_EXTERNAL_DIFF' is set, the diff --git a/t/t5100/sample.mbox b/t/t5100/sample.mbox index 070c1661b..0476b96c3 100644 --- a/t/t5100/sample.mbox +++ b/t/t5100/sample.mbox @@ -407,3 +407,26 @@ Subject: [PATCH] another patch Hey you forgot the patch! +From nobody Mon Sep 17 00:00:00 2001 +From: A U Thor <a.u.thor@example.com> +Date: Mon, 17 Sep 2001 00:00:00 +0900 +Mime-Version: 1.0 +Content-Type: Text/Plain; charset=us-ascii +Content-Transfer-Encoding: Quoted-Printable + +=0A=0AFrom: F U Bar <f.u.bar@example.com> +Subject: [PATCH] updates=0A=0AThis is to fix diff-format documentation. + +diff --git a/Documentation/diff-format.txt b/Documentation/diff-format.txt +index b426a14..97756ec 100644 +--- a/Documentation/diff-format.txt ++++ b/Documentation/diff-format.txt +@@ -81,7 +81,7 @@ The "diff" formatting options can be customized via the + environment variable 'GIT_DIFF_OPTS'. For example, if you + prefer context diff: +=20 +- GIT_DIFF_OPTS=3D-c git-diff-index -p $(cat .git/HEAD) ++ GIT_DIFF_OPTS=3D-c git-diff-index -p HEAD +=20 +=20 + 2. When the environment variable 'GIT_EXTERNAL_DIFF' is set, the diff --git a/t/t7003-filter-branch.sh b/t/t7003-filter-branch.sh index 5f60b22d8..868babc4b 100755 --- a/t/t7003-filter-branch.sh +++ b/t/t7003-filter-branch.sh @@ -165,4 +165,18 @@ test_expect_success '"map" works in commit filter' ' git rev-parse --verify master ' +test_expect_success 'Name needing quotes' ' + + git checkout -b rerere A && + mkdir foo && + name="れれれ" && + >foo/$name && + git add foo && + git commit -m "Adding a file" && + git filter-branch --tree-filter "rm -fr foo" && + ! git ls-files --error-unmatch "foo/$name" && + test $(git rev-parse --verify rerere) != $(git rev-parse --verify A) + +' + test_done diff --git a/t/t7502-status.sh b/t/t7502-status.sh index b64ce30ff..e00607490 100755 --- a/t/t7502-status.sh +++ b/t/t7502-status.sh @@ -128,4 +128,25 @@ test_expect_success 'status without relative paths' ' ' +cat <<EOF >expect +# On branch master +# Changes to be committed: +# (use "git reset HEAD <file>..." to unstage) +# +# modified: dir1/modified +# +# Untracked files: +# (use "git add <file>..." to include in what will be committed) +# +# dir1/untracked +# dir2/ +# expect +# output +# untracked +EOF +test_expect_success 'status of partial commit excluding new file in index' ' + git status dir1/modified >output && + diff -u expect output +' + test_done |