]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
let's reset before clone
authorMathias Klette <mathias.klette@profitbricks.com>
Wed, 16 May 2012 14:42:04 +0000 (16:42 +0200)
committerMathias Klette <mathias.klette@profitbricks.com>
Wed, 16 May 2012 14:42:04 +0000 (16:42 +0200)
debian_build.py

index 2c608d4a4ea5d0af8cda6f5b1ff345c58bad3590..d204a6a32afe24da73b139bea15e85c8d337b127 100755 (executable)
@@ -252,6 +252,10 @@ if __name__ == '__main__':
 
     repo = git.repo.Repo()
 
+    # reset local repository first
+    gitcmd = git.Git('.')
+    gitcmd.reset('HEAD')
+
     #if GIT_BRANCH_NAME != 'master':
     localname = GIT_BRANCH_NAME
     remotename = os.path.join('origin', GIT_BRANCH_NAME)