Skip to content

Commit

Permalink
Simplified stderr usage - no need to convert to String.
Browse files Browse the repository at this point in the history
  • Loading branch information
nwinkler committed Dec 16, 2014
1 parent 3e7d128 commit 3452dce
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/core/resolvers/GitRemoteResolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,13 +195,10 @@ GitRemoteResolver.prototype._supportsShallowCloning = function () {
})
.spread(function (stdout, stderr) {
// Check stderr for content-type, ignore stdout
var stderrString;
var isSmartServer;

stderrString = stderr.toString();

// If the content type is 'x-git', then the server supports shallow cloning
isSmartServer = mout.string.contains(stderrString,
isSmartServer = mout.string.contains(stderr,
'Content-Type: application/x-git-upload-pack-advertisement');

this._logger.debug('detect-smart-git', 'Smart Git host detected: ' + isSmartServer);
Expand Down

0 comments on commit 3452dce

Please sign in to comment.