diff options
| author | Vicent Marti <vicent@github.com> | 2014-09-15 20:26:12 +0200 |
|---|---|---|
| committer | Vicent Marti <vicent@github.com> | 2014-09-15 20:26:12 +0200 |
| commit | a7fcac13a5a2590fe930d84fa471713861e76f25 (patch) | |
| tree | 02bf1033592b23869da930b9c4def991f5fe633f /src/remote.c | |
| parent | 3a495c19bd280f5455047a9ac0e936f2c2f2f9a9 (diff) | |
| parent | d908351a6c24d2d849e60a62bfb032a34ba96277 (diff) | |
| download | libgit2-a7fcac13a5a2590fe930d84fa471713861e76f25.tar.gz | |
Merge pull request #2554 from linquize/fetch-head-tag
When auto follow tags, FETCH_HEAD should list only newly followed tags
Diffstat (limited to 'src/remote.c')
| -rw-r--r-- | src/remote.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/remote.c b/src/remote.c index fa5ec8b4c..b0b5ff9d8 100644 --- a/src/remote.c +++ b/src/remote.c @@ -1065,16 +1065,20 @@ static int update_tips_for_spec( if (autotag && !git_odb_exists(odb, &head->oid)) continue; - if (git_vector_insert(&update_heads, head) < 0) + if (!autotag && git_vector_insert(&update_heads, head) < 0) goto on_error; error = git_reference_name_to_id(&old, remote->repo, refname.ptr); if (error < 0 && error != GIT_ENOTFOUND) goto on_error; - if (error == GIT_ENOTFOUND) + if (error == GIT_ENOTFOUND) { memset(&old, 0, GIT_OID_RAWSZ); + if (autotag && git_vector_insert(&update_heads, head) < 0) + goto on_error; + } + if (!git_oid__cmp(&old, &head->oid)) continue; |
