From d7081fadb18c3e26b9052b472fab82c2923ffb9f Mon Sep 17 00:00:00 2001 From: Pierre Vanduynslager Date: Wed, 9 May 2018 13:25:41 -0400 Subject: [PATCH] fix: use `git rev-parse origin/${branch}` to verify origin head --- lib/git.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/git.js b/lib/git.js index 474af2ee..f8f9f722 100644 --- a/lib/git.js +++ b/lib/git.js @@ -143,10 +143,10 @@ async function verifyTagName(tagName) { * * @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) { - return isRefInHistory(await execa.stdout('git', ['rev-parse', `${branch}@{u}`])); + return isRefInHistory(await execa.stdout('git', ['rev-parse', `origin/${branch}`])); } module.exports = {