Skip to content

Fix error when issuing git pull on remote-only branch

Igor Frenkel requested to merge 294296-add-conditional-git-pull into master

What does this MR do?

This MR fixes the error returned by git when issuing a git pull against a branch that does not exist in the local copy of gemnasium-db.

Discussion

The approach I chose adds yet another git command to verify the state of the checkout. This is overly complicated and I'm in the search of something simpler and welcome suggestions.

Note: I broke up the conditional git pull out into a separate updateRef func as Update was getting a little hard to follow. I'm not sure if this is the best way. Looking for input here too.

What are the relevant issue numbers?

gitlab-org/gitlab#294296 (closed)

Does this MR meet the acceptance criteria?

Edited by Igor Frenkel

Merge request reports

Loading