Skip to content

Add a RemoteName property to avoid lookups #1287

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

Merged
merged 2 commits into from
Mar 22, 2016
Merged

Conversation

niik
Copy link
Contributor

@niik niik commented Mar 22, 2016

Sometimes all you need is the name and right now there's no way of getting it short of git_remote_lookup. While going through a lookup guarantees that the remote exists that shouldn't be the concern of the Branch, it should just let the caller know what's been configured as it's remote.

cc @carlosmn We could/should ditch the Remote property here IMO seeing how it's disposable now and have callers to go through Repository.Remotes

cc @ethomson

/// <see cref="Remote"/> to fetch from and push to. If this is a
/// remote-tracking branch, this will return the remote containing
/// the tracked branch. If there no tracking information this will
/// return null.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not say it returns a remote but its name.

@carlosmn
Copy link
Member

Let's deprecate the Remote property with a note saying to use RemoteName.

niik added 2 commits March 22, 2016 17:43
Sometimes all you need is the name and right now there's no way of getting
it short of git_remote_lookup. While going through a lookup guarantees
that the remote exists that shouldn't be the concern of the Branch, it
should just let the caller know what's been configured as it's remote.
@niik niik force-pushed the branch-remote-name branch from 8b426af to 9a408b9 Compare March 22, 2016 16:44
@niik
Copy link
Contributor Author

niik commented Mar 22, 2016

Let's deprecate the Remote property with a note saying to use RemoteName.

Done

carlosmn added a commit that referenced this pull request Mar 22, 2016
Add a RemoteName property to avoid lookups
@carlosmn carlosmn merged commit 1f5b128 into master Mar 22, 2016
@Therzok Therzok deleted the branch-remote-name branch March 22, 2016 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants