Skip to content

Commit

Permalink
Merge pull request #203 from Eurofunk/pull-conflict-fix
Browse files Browse the repository at this point in the history
private-bower sometimes fails to refresh certain cached repositories …
  • Loading branch information
Hacklone committed Dec 1, 2015
2 parents 10b989c + 9b9b90e commit e085e5a
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lib/service/repoCaches/gitRepoCache.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ module.exports = function GitRepoCache(options) {
if(fs.existsSync(packageDirPath)) {
fetchRepository()
.then(hardResetRepository)
.then(pullRepository)
.then(function() {
logger.log('Pulled latest for {0}'.format(path.basename(packageDirectory)));
resolve();
Expand All @@ -155,11 +154,7 @@ module.exports = function GitRepoCache(options) {
}

function hardResetRepository() {
return utils.exec('git reset --hard', packageDirPath);
}

function pullRepository() {
return utils.exec('git pull', packageDirPath);
return utils.exec('git reset --hard origin/master', packageDirPath);
}
}
}
Expand Down

0 comments on commit e085e5a

Please sign in to comment.