Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

Missing fetch options: --force, --no-tags and --prune #490

@lupine

Description

@lupine

Encouraged by the success of go-git in our elasticsearch indexer (https://gitlab.com/gitlab-org/gitlab-elasticsearch-indexer), I was hoping to use it in our repository mirroring code, as I'm adding support for SSH public key auth (https://gitlab.com/gitlab-org/gitlab-shell/issues/95 https://gitlab.com/gitlab-org/gitlab-shell/merge_requests/147). This is a simple wrapper around git fetch, but I don't seem able to replicate several aspects of existing behaviour with go-git:

  • git fetch --force seems to be the default behaviour? I can't see any mention of the check --force disables in updateReferenceStorerIfNeeded or its callers, at any rate.

  • git fetch --tags is FetchOptions.Tags = git.AllTags, but what about git fetch --no-tags? There doesn't seem to be a NoTags constant

  • git fetch --prune seems unsupported. In fact, all aspects of git gc seem unsupported - although this could be worked around.

I'd be happy to submit PRs to implement the first two options if they'd be considered for merge.

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