chiark / gitweb /
Checkout with --force on git
authorDaniel Martí <mvdan@mvdan.cc>
Fri, 1 Nov 2013 12:19:07 +0000 (13:19 +0100)
committerDaniel Martí <mvdan@mvdan.cc>
Fri, 1 Nov 2013 12:19:07 +0000 (13:19 +0100)
fdroidserver/common.py

index 024e3ddaaa9fa820759dba014e709c0e1c994821..9f99a1bb0414472e1f345f7cad015273e14e593a 100644 (file)
@@ -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: