mirror of
https://github.com/bower/bower.git
synced 2026-01-15 01:08:07 -05:00
More succinct.
This commit is contained in:
@@ -69,9 +69,7 @@ GitFsResolver.prototype._checkout = function (resolution) {
|
||||
// Checkout resolution
|
||||
return cmd('git', ['checkout', '-f', resolution.tag || resolution.branch || resolution.commit], { cwd: dir })
|
||||
// Cleanup unstagged files
|
||||
.then(function () {
|
||||
return cmd('git', ['clean', '-f', '-d'], { cwd: dir });
|
||||
});
|
||||
.then(cmd.bind(cmd, 'git', ['clean', '-f', '-d'], { cwd: dir }));
|
||||
};
|
||||
|
||||
// -----------------
|
||||
|
||||
@@ -23,9 +23,7 @@ GitRemoteResolver.prototype._checkout = function (resolution) {
|
||||
// Because a commit is not a nammed ref, there's no better solution
|
||||
if (resolution.type === 'commit') {
|
||||
return cmd('git', ['clone', this._source, '.'], { cwd: dir })
|
||||
.then(function () {
|
||||
return cmd('git', ['checkout', resolution.commit], { cwd: dir });
|
||||
});
|
||||
.then(cmd.bind(cmd, 'git', ['checkout', resolution.commit], { cwd: dir }));
|
||||
// Otherwise we are checking out a named ref so we can optimize it
|
||||
} else {
|
||||
branch = resolution.tag || resolution.branch;
|
||||
|
||||
Reference in New Issue
Block a user