diff options
author | Junio C Hamano <junkio@cox.net> | 2007-04-05 16:34:51 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-04-05 16:34:51 -0700 |
commit | 77e6f5bc1009aa588a3b2235758bf5be13b23d85 (patch) | |
tree | cb040ac72459291eda6adf1aa9f10778bc54cdbf /t | |
parent | 33580fbd308593e36395926fd35b501976ad322a (diff) | |
parent | b5da24679ec73f458988523dce9dd17b4e9b0e02 (diff) | |
download | git-77e6f5bc1009aa588a3b2235758bf5be13b23d85.tar.gz git-77e6f5bc1009aa588a3b2235758bf5be13b23d85.tar.xz |
Merge branch 'maint'
* maint:
Fix lseek(2) calls with args 2 and 3 swapped
Honor -p<n> when applying git diffs
Fix dependency of common-cmds.h
Fix renaming branch without config file
DESTDIR support for git/contrib/emacs
gitweb: Fix bug in "blobdiff" view for split (e.g. file to symlink) patches
Document --left-right option to rev-list.
Revert "builtin-archive: use RUN_SETUP"
rename contrib/hooks/post-receieve-email to contrib/hooks/post-receive-email.
rerere: make sorting really stable.
Fix t4200-rerere for white-space from "wc -l"
Diffstat (limited to 't')
-rwxr-xr-x | t/t3200-branch.sh | 9 | ||||
-rwxr-xr-x | t/t4120-apply-popt.sh | 25 | ||||
-rwxr-xr-x | t/t4200-rerere.sh | 11 | ||||
-rwxr-xr-x | t/t5000-tar-tree.sh | 4 |
4 files changed, 44 insertions, 5 deletions
diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh index 9558bdb63..ce2c5f41f 100755 --- a/t/t3200-branch.sh +++ b/t/t3200-branch.sh @@ -83,6 +83,15 @@ test_expect_failure \ git-branch r && git-branch -m q r/q' +mv .git/config .git/config-saved + +test_expect_success 'git branch -m q Q without config should succeed' ' + git-branch -m q Q && + git-branch -m Q q +' + +mv .git/config-saved .git/config + git-config branch.s/s.dummy Hello test_expect_success \ diff --git a/t/t4120-apply-popt.sh b/t/t4120-apply-popt.sh new file mode 100755 index 000000000..2f672f30d --- /dev/null +++ b/t/t4120-apply-popt.sh @@ -0,0 +1,25 @@ +#!/bin/sh +# +# Copyright (c) 2007 Shawn O. Pearce +# + +test_description='git-apply -p handling.' + +. ./test-lib.sh + +test_expect_success setup ' + mkdir sub && + echo A >sub/file1 && + cp sub/file1 file1 && + git add sub/file1 && + echo B >sub/file1 && + git diff >patch.file && + rm sub/file1 && + rmdir sub +' + +test_expect_success 'apply git diff with -p2' ' + git apply -p2 patch.file +' + +test_done diff --git a/t/t4200-rerere.sh b/t/t4200-rerere.sh index 8b611bbea..6ba63d717 100755 --- a/t/t4200-rerere.sh +++ b/t/t4200-rerere.sh @@ -35,7 +35,8 @@ git commit -q -a -m first git checkout -b second master git show first:a1 | -sed -e 's/To die, t/To die! T/' -e 's/life;$/life./' > a1 +sed -e 's/To die, t/To die! T/' > a1 +echo "* END *" >>a1 git commit -q -a -m second # activate rerere @@ -50,10 +51,10 @@ test_expect_success 'recorded preimage' "grep ======= $rr/preimage" test_expect_success 'no postimage or thisimage yet' \ "test ! -f $rr/postimage -a ! -f $rr/thisimage" -test_expect_success 'preimage have right number of lines' ' +test_expect_success 'preimage has right number of lines' ' cnt=$(sed -ne "/^<<<<<<</,/^>>>>>>>/p" $rr/preimage | wc -l) && - test "$cnt" = 10 + test $cnt = 9 ' @@ -75,10 +76,10 @@ cat > expect << EOF For in that sleep of death what dreams may come When we have shuffled off this mortal coil, Must give us pause: there's the respect + That makes calamity of so long life; -<<<<<<< --That makes calamity of so long life. -======= - That makes calamity of so long life; +-* END * ->>>>>>> EOF git rerere diff > out diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh index ac835fe43..b4359df79 100755 --- a/t/t5000-tar-tree.sh +++ b/t/t5000-tar-tree.sh @@ -130,4 +130,8 @@ test_expect_success \ 'validate file contents with prefix' \ 'diff -r a e/prefix/a' +test_expect_success \ + 'git-archive --list outside of a git repo' \ + 'GIT_DIR=some/non-existing/directory git-archive --list' + test_done |