summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-12-15 01:30:03 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-12-15 01:30:03 (GMT)
commit1ed91937e5cd59fdbdfa5f15f6fac132d2b21ce0 (patch)
treef65b929c006c31043213152752ea0c80bf08b9e5 /t
parenta9572072f0ab0ac97e64b0dc01254a3ad95befe1 (diff)
parent294c695d8cfbcf95a5c33fc6ba386f496964defb (diff)
downloadgit-71c1a700da60da8cf99d586cc618c46fef201ed1.zip
git-71c1a700da60da8cf99d586cc618c46fef201ed1.tar.gz
git-71c1a700da60da8cf99d586cc618c46fef201ed1.tar.bz2
GIT 0.99.9n aka 1.0rc6v1.0rc6v0.99.9n
Oh, I hate to do this but I ended up merging big usage string cleanups from Fredrik, git-am enhancements that made a lot of sense for non mbox users from HPA, and rebase changes (done independently by me and Lukas) among other things, so git is still in perpetual state of 1.0rc. 1.0 will probably be next Wednesday, but who knows. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 't')
-rwxr-xr-xt/t3200-branch.sh4
-rwxr-xr-xt/t3400-rebase.sh34
-rwxr-xr-xt/t5400-send-pack.sh10
3 files changed, 45 insertions, 3 deletions
diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh
index 36f7749..c3de151 100755
--- a/t/t3200-branch.sh
+++ b/t/t3200-branch.sh
@@ -16,8 +16,8 @@ test_expect_success \
git-update-index --add A &&
git-commit -m "Initial commit."'
-test_expect_failure \
- 'git branch --help should return error code' \
+test_expect_success \
+ 'git branch --help should return success now.' \
'git-branch --help'
test_expect_failure \
diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh
new file mode 100755
index 0000000..b9d3131
--- /dev/null
+++ b/t/t3400-rebase.sh
@@ -0,0 +1,34 @@
+#!/bin/sh
+#
+# Copyright (c) 2005 Amos Waterland
+#
+
+test_description='git rebase should not destroy author information
+
+This test runs git rebase and checks that the author information is not lost.
+'
+. ./test-lib.sh
+
+export GIT_AUTHOR_EMAIL=bogus_email_address
+
+test_expect_success \
+ 'prepare repository with topic branch, then rebase against master' \
+ 'echo First > A &&
+ git-update-index --add A &&
+ git-commit -m "Add A." &&
+ git checkout -b my-topic-branch &&
+ echo Second > B &&
+ git-update-index --add B &&
+ git-commit -m "Add B." &&
+ git checkout -f master &&
+ echo Third >> A &&
+ git-update-index A &&
+ git-commit -m "Modify A." &&
+ git checkout -f my-topic-branch &&
+ git rebase master'
+
+test_expect_failure \
+ 'the rebase operation should not have destroyed author information' \
+ 'git log | grep "Author:" | grep "<>"'
+
+test_done
diff --git a/t/t5400-send-pack.sh b/t/t5400-send-pack.sh
index 7fc3bd7..f3694ac 100755
--- a/t/t5400-send-pack.sh
+++ b/t/t5400-send-pack.sh
@@ -43,7 +43,15 @@ test_expect_success setup '
test_expect_success \
'pushing rewound head should not barf but require --force' '
# should not fail but refuse to update.
- git-send-pack ./victim/.git/ master &&
+ if git-send-pack ./victim/.git/ master
+ then
+ # now it should fail with Pasky patch
+ echo >&2 Gaah, it should have failed.
+ false
+ else
+ echo >&2 Thanks, it correctly failed.
+ true
+ fi &&
if cmp victim/.git/refs/heads/master .git/refs/heads/master
then
# should have been left as it was!