Skip to content
Permalink
Browse files

retry certain push failures

  • Loading branch information...
novalis committed Jul 31, 2019
1 parent d0c94bb commit 731f3a226ba14998a2426637765379a71bfd5702
Showing with 7 additions and 1 deletion.
  1. +7 −1 node/lib/util/git_util.js
@@ -360,7 +360,13 @@ exports.push = co.wrap(function *(repo, remote, source, target, force, quiet) {
const execString = `\
git -C '${repo.path()}' push ${forceStr} ${remote} ${source}:${target}`;
try {
const result = yield ChildProcess.exec(execString, {env : environ});
let result = yield ChildProcess.exec(execString, {env : environ});
if (result.error &&
result.stderr.indexOf("reference already exists") !== -1) {
// GitLab has a race condition that somehow causes this to
// happen spuriously -- let's retry.
result = yield ChildProcess.exec(execString, {env : environ});
}
if (result.error || !quiet) {
if (result.stdout) {
console.log(result.stdout);

0 comments on commit 731f3a2

Please sign in to comment.
You can’t perform that action at this time.