GitPython icon indicating copy to clipboard operation
GitPython copied to clipboard

Pull raises GitCommandError with no error message

Open Carbenium opened this issue 6 years ago • 3 comments

GitPython: 2.1.11 Python: 3.5 Git: 2.20.1

repo.remotes.orgin.pull() can lead to GitCommandError with no error message.

Running git pull in the terminal leads to exit code 1 and following error message :

Your configuration specifies to merge with the ref 'refs/heads/patch1'
from the remote, but no such ref was fetched.

The GitCommandError should contain the message as well.

Carbenium avatar Mar 18 '19 16:03 Carbenium

Thanks a lot for letting me know!

The remote message parsing unfortunately is inherently flaky and probably incorrect in many places, which is why I think it's OK to acknowledge this one even without having tried to reproduce it.

Byron avatar Jul 20 '19 06:07 Byron

hey @Byron I would like to work on this, can you tell me how to go forward with it?

farhaanbukhsh avatar Oct 15 '19 09:10 farhaanbukhsh

@farhaanbukhsh Thanks for offering your help! You could start to have a look at the contribution guidelines, followed by an explanation on how to run tests.

The test-suite is quite high-level, preferring to operate on integration level (i.e. actually doing things) rather than on unit level (i.e. where the test is fully isolated and tests only a small portion of the code). This doesn't make it easy to write test for remote pulls/fetches, unfortunately. Maybe you can have a look at the existing tests for remotes to see if you could manufacture something that reproduces the issue described here.

Good luck!

Byron avatar Oct 15 '19 11:10 Byron