diff options
| author | Vicent Martà <vicent@github.com> | 2013-05-16 04:41:05 -0700 |
|---|---|---|
| committer | Vicent Martà <vicent@github.com> | 2013-05-16 04:41:05 -0700 |
| commit | 12f831fa1500bdcd1b9a2ef20c4897904983af8e (patch) | |
| tree | 9bfa35e14c1cdacb36ad2c92fad1c5aa8c7e3a3e /src | |
| parent | 54e489c21efc19a14eac0f6f83313e3a753688f8 (diff) | |
| parent | 6fe02c11a6709adb52c2a48cd6470b6e964e6c99 (diff) | |
| download | libgit2-12f831fa1500bdcd1b9a2ef20c4897904983af8e.tar.gz | |
Merge pull request #1586 from jamill/fetch_fix
Fetch should not fail when remote HEAD reference is not present locally
Diffstat (limited to 'src')
| -rw-r--r-- | src/remote.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src/remote.c b/src/remote.c index e5a7df75e..7a64622a5 100644 --- a/src/remote.c +++ b/src/remote.c @@ -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; |
