-
-
Notifications
You must be signed in to change notification settings - Fork 312
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
tracking branch #1181
Merged
Merged
tracking branch #1181
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Byron
force-pushed
the
tracking-branch
branch
7 times, most recently
from
December 17, 2023 19:54
ab58fd5
to
72af6c7
Compare
…Cow<'_, BStr>` instead of `Cow<'_, str>`. That way information won't degenerate due to enforcement of UTF-8.
…_remote_ref_name()`, add `direction` argument (also to `Repository::branch_remote_name()` and `Repository::branch_remote()`). This better differentiates the return value from the corresponding ref objects, which would require the named ref to exist in the repository. The `direction` argument allows to get the reference to push to as well. Further, it now takes a full ref name to support deriving the name of branches to push to. Regarding `Repository::branch_remote()`, previously, this functionality was only available from a `Reference`, but now it's more generally available with just a branch name. The method was also adjusted to permit looking up non-symbolic remote names, like remotes that are specified by their URL.
…name()`. These methods mirror their respective `Repository::branch_*` prefixed versions.
…u|p}`. Previously it would be parsed, but always error as the implementation didn't exist. Now it will return the fetch and push tracking branches respectively.
It's similar to `git rev-parse --symbolic-full-name`.
Byron
force-pushed
the
tracking-branch
branch
from
December 18, 2023 20:16
72af6c7
to
530c15d
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related to #1180 .
Make it easy to obtain the tracking branches.
Tasks
branch_remote_ref_name(kind)
withpush
branch capabilitiesremote_tracking_ref_name(kind)
or similar onReference
remote_ref_name(kind)
or similar onReference
branch_remote_tracking_ref_name(kind)
toRepository
the above on- it's easy to get a reference from Head.Head
revparse
impl ingix
rev parse --reference
Research
push
refspecs, then remote ref to local tracking usingfetch
refspecspush.default
only if there is no explicit push spec