Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remote: add git_refspec to update_tips #6559

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ethomson
Copy link
Member

git shows the remote and local ref information during a fetch. For example:

 * [new branch]          ethomson/nonblocking   -> origin/ethomson/nonblocking

This is not information that users of libgit2 can currently surface since our update_tips callback includes only src/dest OIDs, and the local ref name. Nor can one reliably reverse engineer the remote branch name, since a remote configuration could map two remote specs to a local spec. For example:

        fetch = +refs/pull/*/head:refs/remotes/asdf/*
        fetch = +refs/heads/*:refs/remotes/asdf/*

In this case, given refs/remotes/asdf/foo in the update_tips, a caller would have no idea whether the remote was refs/pull/foo/head or refs/heads/foo.

Provide the matching remote git_refspec so that callers can rtransform themselves into the remote.

@ethomson ethomson force-pushed the ethomson/update_tips_spec branch 2 times, most recently from 9fdac3d to 38e3fd5 Compare May 11, 2023 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant