use git clean - thanks lundy

This commit is contained in:
Jesse Andrews 2011-10-24 19:06:46 -07:00
parent 480644bd74
commit 9fef844fd9

View file

@ -319,11 +319,10 @@ function git_clone {
# set the url to pull from and fetch # set the url to pull from and fetch
git remote set-url origin $GIT_REMOTE git remote set-url origin $GIT_REMOTE
git fetch origin git fetch origin
# if we don't delete the local content, then our system has pyc files # remove the existing ignored files (like pyc) as they cause breakage
# from the previous branch leading to breakage (due to the py files # (due to the py files having older timestamps than our pyc, so python
# having older timestamps than our pyc, so python thinks the pyc files # thinks the pyc files are correct using them)
# are correct using them) sudo git clean -f -d
sudo rm -rf *
git checkout -f origin/$GIT_BRANCH git checkout -f origin/$GIT_BRANCH
# a local branch might not exist for $3 # a local branch might not exist for $3
git branch -D $GIT_BRANCH || true git branch -D $GIT_BRANCH || true