mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Handle a local branch that does not yet track a remote
This commit is contained in:
@@ -489,7 +489,12 @@ module.exports = {
|
||||
},
|
||||
getRemotes: getRemotes,
|
||||
getRemoteBranch: function(cwd) {
|
||||
return runGitCommand(['rev-parse','--abbrev-ref','--symbolic-full-name','@{u}'],cwd)
|
||||
return runGitCommand(['rev-parse','--abbrev-ref','--symbolic-full-name','@{u}'],cwd).catch(function(err) {
|
||||
if (/no upstream configured for branch/.test(err.message)) {
|
||||
return null;
|
||||
}
|
||||
throw err;
|
||||
})
|
||||
},
|
||||
getBranches: getBranches,
|
||||
getBranchInfo: getBranchInfo,
|
||||
|
Reference in New Issue
Block a user