Skip to content

git fetch more verbose - #148

Merged
msiemens merged 3 commits into
msiemens:masterfrom
agido-malter:master
Aug 7, 2026
Merged

msiemens merged 3 commits into
msiemens:masterfrom
agido-malter:master

Conversation

@agido-malter

Copy link
Copy Markdown
Contributor

Show git fetch output in verbose mode
#147

@msiemens

msiemens commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Hey @agido-malter, thanks for the PR! I think we should make this an option that is off by default so we don't suddenly change behavior for existing users. Also, in quiet mode, only sys.stdout is replaced with a StringIO, NOT sys.stderr, so stderr output from git fetch would still get printed. Could you have a look at that?

@agido-malter

Copy link
Copy Markdown
Contributor Author

Hey @agido-malter, thanks for the PR! I think we should make this an option that is off by default so we don't suddenly change behavior for existing users. Also, in quiet mode, only sys.stdout is replaced with a StringIO, NOT sys.stderr, so stderr output from git fetch would still get printed. Could you have a look at that?

Thanks, good points.

I’ve changed the implementation to introduce a new git-up.fetch.progress option, which defaults to false, so the existing behavior remains unchanged.
When enabled, the stderr output from git fetch is forwarded to the terminal. In quiet mode, the option is overridden and fetch output remains suppressed, while actual fetch errors are still captured and reported normally.
I’ll also add documentation and tests for the default, enabled, and quiet-mode behavior.

@msiemens

msiemens commented Aug 6, 2026 •

Copy link
Copy Markdown
Owner

Thanks, @agido-malter! From what I can see, there are two issues remaining:

  1. non-ASCII branch names trigger crashes, e.g. a remote branch called branch-äöüß. Could you add a test for that?
  2. When printing an error, this now prints it as a raw byte string, i.e. b"fatal: '/does/not/exist' does not appear to be a git repository\nfatal: Could not read from.... Maybe you could decode the string first with .decode('utf-8', errors='replace')?

Make fetch progress opt-in, respect quiet mode, and handle
non-ASCII refs and fetch failures without duplicate output.
@msiemens
msiemens merged commit 80b7997 into msiemens:master Aug 7, 2026
16 checks passed
@msiemens

msiemens commented Aug 7, 2026

Copy link
Copy Markdown
Owner

Thanks for your work, @agido-malter!

@msiemens

Copy link
Copy Markdown
Owner

FYI: This is now released in PyGitUp v2.5.0

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

Successfully merging this pull request may close these issues.

2 participants