diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2015-04-08 10:41:18 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2015-04-08 10:41:18 +0200 |
commit | 723f100a422577235e06dc024a73285710770fca (patch) | |
tree | b57fa57b0929770029ca7a71389bd8d5410410d2 /git/util.py | |
parent | 98f6995bdcbd10ea0387d0c55cb6351b81a857fd (diff) | |
download | gitpython-723f100a422577235e06dc024a73285710770fca.tar.gz |
fix(docs): be clear about exit code handling
When pushing/pulling, we ignore errors unless it's exit code 128.
The reason for this is now made explicit to make clear that issues
are handled by PushInfo flags accordingly.
Related #271
Diffstat (limited to 'git/util.py')
-rw-r--r-- | git/util.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/git/util.py b/git/util.py index 02c54bc3..f41f20fb 100644 --- a/git/util.py +++ b/git/util.py @@ -159,6 +159,23 @@ def finalize_process(proc): except GitCommandError: # if a push has rejected items, the command has non-zero return status # a return status of 128 indicates a connection error - reraise the previous one + # Everything else will still be parsed and made available through PushInfo flags + # Estimated error results look like this: + # ```bash + # To /var/folders/xp/m48gs2tx2vg95tmtzw7tprs40000gn/T/tmpk5jeBeremote_repo_test_base + # ! refs/heads/master:refs/heads/master [rejected] (non-fast-forward) + # Done + # error: failed to push some refs to + # '/var/folders/xp/m48gs2tx2vg95tmtzw7tprs40000gn/T/tmpk5jeBeremote_repo_test_base' + # hint: Updates were rejected because the tip of your current branch is behind + # hint: its remote counterpart. Integrate the remote changes (e.g. + # hint: 'git pull ...') before pushing again. + # hint: See the 'Note about fast-forwards' in 'git push --help' for details. + # ``` + # See https://github.com/gitpython-developers/GitPython/blob/master/git/test/test_remote.py#L305 + # on how to check for these kinds of errors. + # Also see this issue for a reason for this verbosity: + # https://github.com/gitpython-developers/GitPython/issues/271 if proc.poll() == 128: raise pass |