Permalink
Browse files

Merge pull request #6 from Khan/master

Deal with force-pushes, hopefully
  • Loading branch information...
2 parents e3da6ee + 8ea27c0 commit c266d4cee019c4792d1ec8c3084b5756bf437eb8 Julian Pulgarin committed Mar 18, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 main/views.py
View
@@ -53,7 +53,8 @@ def sandcastle(request, number=None, branch=None):
os.chdir(os.path.join(settings.PROJECT_DIR, 'media/castles'))
if os.path.isdir(name):
os.chdir(name)
- call(["git", "pull", "origin", branch])
+ call(["git", "fetch", "origin", branch])
+ call(["git", "reset", "--hard", "FETCH_HEAD"])
else:
call(["git", "clone", "--branch=%s" % branch, "git://github.com/%s/%s.git" % (user, settings.SANDCASTLE_REPO), name])

0 comments on commit c266d4c

Please sign in to comment.