wrapper: clean the source dir before a checkout

Git doesn't clear folders containing untracked files when switching to
another branch. The autohelp script uses invalid .pyc files when such
switches happen in the diff_branches.py script. This change removes all
the .pyc files before a checkout to avoid this problem.

Change-Id: I0acd0308a3651b27d158546036de5cb0b42d974c
This commit is contained in:
Gauvain Pocentek 2014-09-07 21:16:37 +02:00
parent 9ec7a6f6c1
commit 12895f325e
1 changed files with 1 additions and 0 deletions

View File

@ -154,6 +154,7 @@ if [ "$FAST" -eq 0 ] ; then
(
cd $SOURCESDIR/$project
find $project -name "*.pyc" -delete
GIT_CMD="git show-ref --verify --quiet refs/heads/$BRANCH"
if $GIT_CMD; then
git checkout $BRANCH