Skip to content

bug: git_remote_download returns invalid if allow-tip-sha1-in-want not advertised #7078

@DanConwayDev

Description

@DanConwayDev

git_remote_download returns Invalid if git server doesn't include in allow-tip-sha1-in-want in git-upload-pack-advertisement. gitlib2 should not require this flag to align with the behaviour of the reference implementation git fetch <remote> <oid>.

To reproduce:

  1. serve a git repo with default settings (and http.receivepack = true) using git-http-backend and reqest refs using git_remote_download using a http remote and it will return Invalid.
  2. add the http remote in the standard git client and successfully receive the oids with git fetch <remote> <oid>
  3. add git config uploadpack.allowTipSHA1InWant = true and successfully receive the oids using git_remote_download

Context: I am using rust git2 wrapper for a git-remote-helper and whilst the large git servers all advertise allow-tip-sha1-in-want many self-hosted setups do not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions