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

Introduce RemoteCollection #447

Merged
merged 1 commit into from
Nov 11, 2014
Merged

Conversation

carlosmn
Copy link
Member

@carlosmn carlosmn commented Nov 8, 2014

This lets us look up remotes by name, which is not possible by just
returning the list of remotes.

Move remote creation to Repostiory.remotes.create() and keep the old
Repository.create_remote() for compatibility, delegating to this new
way.

Existing code should keep working, but this moves us towards what we'd
need for a better interface in 0.22 which makes remote renaming and
deleting work with a name rather than an instance and would make sense
to exist as part of an Remote.remotes object.

@carlosmn
Copy link
Member Author

PR updated to have the implementation in __iter__() directly, and Repository.remotes be the collection directly instead of the attribute.

@carlosmn
Copy link
Member Author

This probably needs an updated documentation as well.

This lets us look up remotes by name, which is not possible by just
returning the list of remotes.

Move remote creation to Repostiory.remotes.create() and keep the old
Repository.create_remote() for compatibility, delegating to this new
way.

Existing code should keep working, but this moves us towards what we'd
need for a better interface in 0.22 which makes remote renaming and
deleting work with a name rather than an instance and would make sense
to exist as part of an Remote.remotes object.
@jdavid jdavid merged commit b80103b into libgit2:master Nov 11, 2014
@carlosmn carlosmn deleted the remote-collection branch November 12, 2014 13:15
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.

None yet

2 participants