fix: use git rev-parse origin/${branch}
to verify origin head
This commit is contained in:
parent
61d7d38ec2
commit
d7081fadb1
@ -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 = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user