chiark / gitweb /
Some clean-up of the branch manipulation commands
[stgit] / t / t1000-branch-create.sh
index bc796b4095c50e26d99f9a8c90387243f5231a2b..f024501cd11a68b9f1221583aff807eb04e67ee3 100755 (executable)
@@ -10,10 +10,17 @@ Exercises the "stg branch" commands.
 
 . ./test-lib.sh
 
-stg init
+test_expect_success \
+    'Create a branch when the current one is not an StGIT stack' '
+    git branch origin &&
+    stg branch --create new origin &&
+    test $(stg branch) == "new"
+'
 
 test_expect_success \
     'Create a spurious patches/ entry' '
+    stg branch master &&
+    stg init &&
     find .git -name foo | xargs rm -rf &&
     mkdir -p .git/patches && touch .git/patches/foo
 '