From f10d76e2aa7c18faabab99169b79a9e9ccc97b69 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Wed, 8 Feb 2012 18:34:51 +0100 Subject: [PATCH] lets try to get rid of the double clone --- lib/git_helper.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/git_helper.py b/lib/git_helper.py index f6020b5..228f63a 100644 --- a/lib/git_helper.py +++ b/lib/git_helper.py @@ -118,6 +118,17 @@ def git_checkout_branch(branch_name): #if not git_repo_has_branch(branch_name): #raise BranchNotExistError(branch_name) + cmd = [GIT, 'reset', '--hard'] + + cmdobj = subprocess.Popen( + cmd, + shell=False, + close_fds=True, + stderr=subprocess.PIPE, + stdout=subprocess.PIPE, + env={'':''}, + cwd=os.getcwd() + ) cmd = [GIT, 'checkout', branch_name] cmdobj = subprocess.Popen( -- 2.39.5