fix: use git rev-parse origin/${branch} to verify origin head

This commit is contained in:
Pierre Vanduynslager 2018-05-09 13:25:41 -04:00 committed by Gregor Martynus
parent 61d7d38ec2
commit d7081fadb1

View File

@ -143,10 +143,10 @@ async function verifyTagName(tagName) {
* *
* @param {String} branch The repository branch for which to verify status. * @param {String} branch The repository branch for which to verify status.
* *
* @return {Boolean} `true` is the HEAD of the current local branch is the same as the HEAD of the remote branch, `false` otherwise. * @return {Boolean} `true` is the HEAD of the current local branch is the same as the HEAD of the remote branch, falsy otherwise.
*/ */
async function isBranchUpToDate(branch) { async function isBranchUpToDate(branch) {
return isRefInHistory(await execa.stdout('git', ['rev-parse', `${branch}@{u}`])); return isRefInHistory(await execa.stdout('git', ['rev-parse', `origin/${branch}`]));
} }
module.exports = { module.exports = {