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

Does not work with local remotes #56

Closed
Tatsh opened this issue Nov 3, 2016 · 2 comments
Closed

Does not work with local remotes #56

Tatsh opened this issue Nov 3, 2016 · 2 comments

Comments

@Tatsh
Copy link
Contributor

Tatsh commented Nov 3, 2016

I know that sounds strange. But if you have a local directory as one of your remotes, the script fails:

Traceback (most recent call last):
  File "/Users/audvare/.virtualenvs/zzz/bin/git-up", line 11, in <module>
    sys.exit(run())
  File "/Users/audvare/.virtualenvs/zzz/lib/python2.7/site-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/Users/audvare/.virtualenvs/zzz/lib/python2.7/site-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/Users/audvare/.virtualenvs/zzz/lib/python2.7/site-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/audvare/.virtualenvs/zzz/lib/python2.7/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/Users/audvare/.virtualenvs/zzz/lib/python2.7/site-packages/PyGitUp/gitup.py", line 600, in run
    gitup.run()
  File "/Users/audvare/.virtualenvs/zzz/lib/python2.7/site-packages/PyGitUp/gitup.py", line 182, in run
    self.fetch()
  File "/Users/audvare/.virtualenvs/zzz/lib/python2.7/site-packages/PyGitUp/gitup.py", line 301, in fetch
    self.git.fetch(tostdout=True, *fetch_args, **fetch_kwargs)
  File "/Users/audvare/.virtualenvs/zzz/lib/python2.7/site-packages/PyGitUp/git_wrapper.py", line 123, in <lambda>
    return lambda *args, **kwargs: self.run(name, *args, **kwargs)
  File "/Users/audvare/.virtualenvs/zzz/lib/python2.7/site-packages/PyGitUp/git_wrapper.py", line 118, in run
    raise GitError(message, stderr=error.stderr, stdout=stdout)
  File "/Users/audvare/.virtualenvs/zzz/lib/python2.7/site-packages/PyGitUp/git_wrapper.py", line 230, in __init__
    super(GitError, self).__init__(None, None, stderr)
  File "/Users/audvare/.virtualenvs/zzz/lib/python2.7/site-packages/git/exc.py", line 74, in __init__
    super(GitCommandError, self).__init__(command, status, stderr, stdout)
  File "/Users/audvare/.virtualenvs/zzz/lib/python2.7/site-packages/git/exc.py", line 38, in __init__
    command = command.split()
AttributeError: 'NoneType' object has no attribute 'split'

To reproduce:

cd $myrepo
git remote add other ~/somewhere/local
git up
@msiemens
Copy link
Owner

msiemens commented Nov 3, 2016

That's really interesting, thanks for reporting! I suspect that the new GitPython release v2.0 somehow breaks PyGitUp as it seems to have worked fine with v1.0. I'll investiage this. BTW also breaks the test suite as it too uses local remotes 😄

msiemens added a commit that referenced this issue Nov 3, 2016
Up to now, we specified GitPython >= 1.0.2 which included v2.0 which
changed its implementation details so it broke our error handling.
Now we don't depend on GitPython's `GitCommandError` any more as
there was no real need to subclass it anyway.

Not fully tested on my machine, will see if this actually fixes it.

See #56
@msiemens
Copy link
Owner

msiemens commented Nov 3, 2016

Seems to be fixed in 2aa1190, I'll release a new version of PyGitUp soon :)

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

No branches or pull requests

2 participants