more ::checkoutHead specs

This commit is contained in:
Daniel Hengeveld
2015-10-16 19:24:34 +02:00
parent dfb24ce617
commit df949d3a3d
2 changed files with 32 additions and 21 deletions

View File

@@ -63,9 +63,9 @@ module.exports = class GitRepositoryAsync {
}
checkoutHead (_path) {
return this.repoPromise.then(function (repo) {
return this.repoPromise.then((repo) => {
var checkoutOptions = new Git.CheckoutOptions()
checkoutOptions.paths = [_path]
checkoutOptions.paths = [this._gitUtilsRepo.relativize(_path)]
checkoutOptions.checkoutStrategy = Git.Checkout.STRATEGY.FORCE | Git.Checkout.STRATEGY.DISABLE_PATHSPEC_MATCH
Git.Checkout.head(repo, checkoutOptions)
})