From 752d7dcc337f8fd8a17d3d640434fdedbb642def Mon Sep 17 00:00:00 2001 From: Robin Wittler Date: Wed, 3 Aug 2011 14:53:42 +0200 Subject: [PATCH] add check --- lib/git_helper.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/git_helper.py b/lib/git_helper.py index 771e6e0..779b57f 100644 --- a/lib/git_helper.py +++ b/lib/git_helper.py @@ -72,6 +72,8 @@ def git_clone_remote_repository(url, destination): def git_new_branch_from(branch_name, from_branch): if git_repo_has_branch(branch_name): raise BranchExistError(branch_name) + if not git_repo_has_branch(from_branch): + raise BranchNotExistError(from_branch) cmd = [GIT, 'checkout', '-b', branch_name, from_branch] cmdobj = subprocess.Popen( -- 2.39.5