diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-03-07 22:34:13 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-03-07 22:34:13 -0800 |
commit | 934f788981de941814e821217f32451a5c715d5d (patch) | |
tree | b98d42ef8c9606b34f9b9389d2d65190db1ecc37 /t | |
parent | 113106e06c48cc80432fd1be8af912898e8f240e (diff) | |
parent | 9a6682bab5e800465f0a4e44cdf18fe396ff4f6d (diff) | |
download | git-934f788981de941814e821217f32451a5c715d5d.tar.gz |
Merge branch 'maint'
* maint:
builtin-revert.c: release index lock when cherry-picking an empty commit
document config --bool-or-int
t1300: use test_must_fail as appropriate
cleanup: add isascii()
Documentation: fix badly indented paragraphs in "--bisect-all" description
Diffstat (limited to 't')
-rwxr-xr-x | t/t1300-repo-config.sh | 10 | ||||
-rwxr-xr-x | t/t3505-cherry-pick-empty.sh | 33 |
2 files changed, 38 insertions, 5 deletions
diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh index 11b82f43dd..3c06842d99 100755 --- a/t/t1300-repo-config.sh +++ b/t/t1300-repo-config.sh @@ -336,10 +336,10 @@ test_expect_success 'get bool variable with empty value' \ 'git config --bool emptyvalue.variable > output && cmp output expect' -git config > output 2>&1 - -test_expect_success 'no arguments, but no crash' \ - "test $? = 129 && grep usage output" +test_expect_success 'no arguments, but no crash' ' + test_must_fail git config >output 2>&1 && + grep usage output +' cat > .git/config << EOF [a.b] @@ -373,7 +373,7 @@ EOF test_expect_success 'new variable inserts into proper section' 'cmp .git/config expect' test_expect_success 'alternative GIT_CONFIG (non-existing file should fail)' \ - 'git config --file non-existing-config -l; test $? != 0' + 'test_must_fail git config --file non-existing-config -l' cat > other-config << EOF [ein] diff --git a/t/t3505-cherry-pick-empty.sh b/t/t3505-cherry-pick-empty.sh new file mode 100755 index 0000000000..9aaeabd972 --- /dev/null +++ b/t/t3505-cherry-pick-empty.sh @@ -0,0 +1,33 @@ +#!/bin/sh + +test_description='test cherry-picking an empty commit' + +. ./test-lib.sh + +test_expect_success setup ' + + echo first > file1 && + git add file1 && + test_tick && + git commit -m "first" && + + git checkout -b empty-branch && + test_tick && + git commit --allow-empty -m "empty" + +' + +test_expect_code 1 'cherry-pick an empty commit' ' + + git checkout master && + git cherry-pick empty-branch + +' + +test_expect_success 'index lockfile was removed' ' + + test ! -f .git/index.lock + +' + +test_done |