Just detect exit status rather than check ref

Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/13416#note_37193731

So we just try a cheaper way to detect it if it works or not
This commit is contained in:
Lin Jen-Shin 2017-08-10 18:08:58 +08:00
parent 412db1874f
commit 023d6749c2
1 changed files with 1 additions and 1 deletions

View File

@ -1024,7 +1024,7 @@ class Repository
message, status = run_git(args)
# Make sure ref was created, and raise Rugged::ReferenceError when not
raise Rugged::ReferenceError, message unless ref_exists?(target_ref)
raise Rugged::ReferenceError, message if status != 0
end
def create_ref(ref, ref_path)