Skip to content

Commit

Permalink
Merge pull request libgit2#1586 from jamill/fetch_fix
Browse files Browse the repository at this point in the history
Fetch should not fail when remote HEAD reference is not present locally
  • Loading branch information
Vicent Martí committed May 16, 2013
2 parents 54e489c + 6fe02c1 commit 12f831f
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions src/remote.c
Original file line number Diff line number Diff line change
Expand Up @@ -870,19 +870,6 @@ static int update_tips_for_spec(git_remote *remote, git_refspec *spec, git_vecto
if (git_vector_init(&update_heads, 16, NULL) < 0)
return -1;

/* Let's go find HEAD, if it exists. Check only the first ref in the vector. */
if (refs->length > 0) {
head = git_vector_get(refs, 0);

if (!strcmp(head->name, GIT_HEAD_FILE)) {
if (git_reference_create(&ref, remote->repo, GIT_FETCH_HEAD_FILE, &head->oid, 1) < 0)
goto on_error;

i = 1;
git_reference_free(ref);
}
}

for (; i < refs->length; ++i) {
head = git_vector_get(refs, i);
autotag = 0;
Expand Down

0 comments on commit 12f831f

Please sign in to comment.