Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

remote: add update_refs with git_refspec#6559

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ethomson merged 1 commit intomainfromethomson/update_tips_spec
Oct 19, 2024

Conversation

ethomson
Copy link
Member

git shows theremote andlocal 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 ourupdate_tips callback includes only src/dest OIDs, and thelocal 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, givenrefs/remotes/asdf/foo in theupdate_tips, a caller would have no idea whether the remote wasrefs/pull/foo/head orrefs/heads/foo.

Provide the matching remotegit_refspec so that callers canrtransform themselves into the remote.

@ethomsonethomsonforce-pushed theethomson/update_tips_spec branch 3 times, most recently from38e3fd5 to0e7ab1cCompareMay 11, 2023 12:30
@ethomsonethomsonforce-pushed theethomson/update_tips_spec branch from0e7ab1c to9f53a5cCompareOctober 18, 2024 12:30
@ethomsonethomson changed the titleremote: add git_refspec to update_tipsremote: add update_refs with git_refspecOct 18, 2024
@ethomsonethomsonforce-pushed theethomson/update_tips_spec branch from9f53a5c tofd28687CompareOctober 19, 2024 22:18
Add an `update_refs` callback that includes the refspec; `update_tips`is retained for backward compatibility.
@ethomsonethomsonforce-pushed theethomson/update_tips_spec branch fromfd28687 toc1b2b25CompareOctober 19, 2024 22:42
@ethomsonethomson merged commit1692d30 intomainOct 19, 2024
18 of 19 checks passed
@ethomsonethomson deleted the ethomson/update_tips_spec branchOctober 19, 2024 23:44
@fxcoudert
Copy link
Contributor

This ABI-breaking change is not listed in the 1.9.0 release notes. Could it be added?

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@ethomson@fxcoudert

[8]ページ先頭

©2009-2025 Movatter.jp