From: Daniel Martí Date: Fri, 1 Nov 2013 12:19:07 +0000 (+0100) Subject: Checkout with --force on git X-Git-Tag: 0.1~244^2~3 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=e53f006d0832e44ccf20b9b692da924320248fd7;p=fdroidserver.git Checkout with --force on git --- diff --git a/fdroidserver/common.py b/fdroidserver/common.py index 024e3dda..9f99a1bb 100644 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@ -197,7 +197,7 @@ class vcs_git(vcs): self.refreshed = True # Check out the appropriate revision... rev = str(rev if rev else 'origin/master') - if subprocess.call(['git', 'checkout', rev], cwd=self.local) != 0: + if subprocess.call(['git', 'checkout', '-f', rev], cwd=self.local) != 0: raise VCSException("Git checkout failed") # Get rid of any uncontrolled files left behind... if subprocess.call(['git', 'clean', '-dffx'], cwd=self.local) != 0: