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

Works with repos without remotes. #206

Merged
merged 2 commits into from Apr 4, 2017

Conversation

weakish
Copy link
Collaborator

@weakish weakish commented Aug 21, 2016

sync/publish/unpublish will warns as before:

No git remotes configured. Please add one.

Other commands work with repositories without remote.


legit/cli.py | 4 ++++
legit/scm.py | 25 +++++++++++++++----------
2 files changed, 19 insertions(+), 10 deletions(-)

sync/publish/unpublish will warns as before:

    No git remotes configured. Please add one.

Other commands work with repositories without remote.
@weakish
Copy link
Collaborator Author

weakish commented Aug 21, 2016

close #10

Copy link
Collaborator Author

@weakish weakish left a comment

Choose a reason for hiding this comment

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

  • Not all commands are covered.

  • Changing get_remote() to return None when no remote is unnecessary:

    The calling of get_remote is just one place remote = get_remote() (global variable). Then sub commands calls remote.name. Requiring every caller of remote.name to catch AttributeError is verbose. Instead, we should make sure all caller of remote.name checks repo has remotes before. If Python had optional type like Swift, Kotlin and Ceylon, returning None may be a good idea.

@kennethreitz kennethreitz merged commit 7be8429 into frostming:develop Apr 4, 2017
@kennethreitz
Copy link
Collaborator

✨🍰✨

@weakish weakish deleted the without-remote branch July 19, 2017 11:08
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