]> git.droids-corp.org - git-central.git/commitdiff
Set rebase on checkout.
authorStephen Haberman <stephen@exigencecorp.com>
Sun, 22 Jun 2008 19:39:50 +0000 (14:39 -0500)
committerStephen Haberman <stephen@exigencecorp.com>
Sun, 22 Jun 2008 19:39:50 +0000 (14:39 -0500)
tests/t1100-client-post-commit-rebase.sh [new file with mode: 0644]

diff --git a/tests/t1100-client-post-commit-rebase.sh b/tests/t1100-client-post-commit-rebase.sh
new file mode 100644 (file)
index 0000000..af83b20
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+test_description='client checkout auto-set branch rebase=true'
+
+. ./test-lib.sh
+
+test_expect_success 'setup' '
+       echo "setup" >file &&
+       git add file &&
+       git commit -m "setup"
+'
+
+# setup the post-checkout hook
+install_client_hook 'post-checkout-rebase' 'post-checkout'
+
+test_expect_success 'sets rebase on new topic branch' '
+       ! git config --list | grep branch.master.rebase &&
+       git checkout -b topic master &&
+       git config --list | grep branch.topic.rebase=true
+'
+
+test_done
+