Commit 32350e89 by Edward Thomson

remote: don't update invalid refs

If a symbolic reference points to something invalid, then do not try to
update it.
parent c41871e5
......@@ -1141,6 +1141,16 @@ static int remote_head_for_ref(git_remote_head **out, git_remote *remote, git_re
ref_name = git_reference_name(resolved_ref);
}
/*
* The ref name may be unresolvable - perhaps it's pointing to
* something invalid. In this case, there is no remote head for
* this ref.
*/
if (!ref_name) {
error = 0;
goto cleanup;
}
if ((error = ref_to_update(&update, &remote_name, remote, spec, ref_name)) < 0)
goto cleanup;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment