From e9f8f159ebad405b2c08aa75f735146bb8e216ef Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 8 Apr 2015 11:00:32 +0200 Subject: fix(remote): allow to raise during push/fetch Do not swallow non-zero exit status during push and fetch unless we managed to parse head information. This behaviour will effetively handle cases were no work was done due to invalid refspecs or insufficient permissions. Fixes #271 --- git/test/test_remote.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'git/test/test_remote.py') diff --git a/git/test/test_remote.py b/git/test/test_remote.py index 8500a295..c419ecee 100644 --- a/git/test/test_remote.py +++ b/git/test/test_remote.py @@ -313,8 +313,7 @@ class TestRemote(TestBase): self._do_test_push_result(res, remote) # invalid refspec - res = remote.push("hellothere") - assert len(res) == 0 + self.failUnlessRaises(GitCommandError, remote.push, "hellothere") # push new tags progress = TestRemoteProgress() -- cgit v1.2.1