Skip to content

Commit

Permalink
Merge pull request #835 from remram44/git-update
Browse files Browse the repository at this point in the history
Makes git_update.sh handle detached heads
  • Loading branch information
aashish24 committed Oct 22, 2014
2 parents 593e5af + f31df7a commit 7f6b49d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMake/cdat_modules_extra/git_update.sh.in
Expand Up @@ -2,7 +2,7 @@
cd @SOURCE_DIR@
git fetch origin --prune
branch_name=$(git symbolic-ref HEAD | sed -e 's,.*\/\(.*\),\1,')
if [ "${branch_name}" != "@BRANCH@" ]; then
if [ $? = 0 -a "${branch_name}" != "@BRANCH@" ]; then
git checkout -f @BRANCH@
fi
git reset --hard origin/@BRANCH@
Expand Down

0 comments on commit 7f6b49d

Please sign in to comment.