Skip to content

Let's mimic git.git auto tag fetch behavior. #936

Open
@nulltoken

Description

@nulltoken

Related to https://github.com/libgit2/libgit2sharp/pull/927/files#r23450279

git fetch against a newly initialized repository with the following config

[core]
    repositoryformatversion = 0
    filemode = false
    bare = false
    logallrefupdates = true
    symlinks = false
    ignorecase = true
    hideDotFiles = dotGitOnly
[remote "origin"]
    url = https://github.com/libgit2/TestGitRepository
    fetch = +refs/heads/*:refs/remotes/origin/*

outputs

$ git fetch
remote: Counting objects: 68, done.
remote: Total 68 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (68/68), done.
From https://github.com/libgit2/TestGitRepository
 * [new branch]      first-merge -> origin/first-merge
 * [new branch]      master     -> origin/master
 * [new branch]      no-parent  -> origin/no-parent
remote: Counting objects: 1, done.
remote: Total 1 (delta 0), reused 1 (delta 0)
Unpacking objects: 100% (1/1), done.
 * [new tag]         annotated_tag -> annotated_tag
 * [new tag]         blob       -> blob
 * [new tag]         commit_tree -> commit_tree

git is noticing that the server did not automatically send the tags and is performing a second fetch. This second fetch is completely different from the first one

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions