You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using gitpython for a small helper tool to manage somewhat complicated submodule setups.
I want it to work alongside standard git, not agaionst or around it.
Hence I want users to see the output of the commands. as they know it from plain vanilla git
e.g. a "Everything up to date" after a push without changes.
From the docs I was not really able to figure out a consistent way to do it.
For commit, I was able to achieve it like this: print(toprepo.git.commit(a=pa.add, m=msg, with_stdout=True))
For push, the same does not work, because it ends up on stderr print(toprepo.git.push(pa.remote, with_stdout=True)):
Logger produces this: INFO:git.cmd:git push origin -> 0; stdout: '<OUTPUT_STREAM>'; stderr: 'Everything up-to-date'
When using the built in remote.push() and remote.pull() methosds I cannot find a way to retrieve the output at all, as with_stdout=False is hardcoded without a way to override it via kwargs.
Can you give guidance on how to cover my use-case?
The text was updated successfully, but these errors were encountered:
Hi,
I am using gitpython for a small helper tool to manage somewhat complicated submodule setups.
I want it to work alongside standard git, not agaionst or around it.
Hence I want users to see the output of the commands. as they know it from plain vanilla git
e.g. a "Everything up to date" after a push without changes.
From the docs I was not really able to figure out a consistent way to do it.
For commit, I was able to achieve it like this:
print(toprepo.git.commit(a=pa.add, m=msg, with_stdout=True))
For push, the same does not work, because it ends up on stderr
print(toprepo.git.push(pa.remote, with_stdout=True))
:Logger produces this:
INFO:git.cmd:git push origin -> 0; stdout: '<OUTPUT_STREAM>'; stderr: 'Everything up-to-date'
When using the built in remote.push() and remote.pull() methosds I cannot find a way to retrieve the output at all, as with_stdout=False is hardcoded without a way to override it via kwargs.
Can you give guidance on how to cover my use-case?
The text was updated successfully, but these errors were encountered: