Skip to content

Suppress verbose git checkout --detached output with --quiet#2379

Open
maschwenk wants to merge 4 commits intoactions:mainfrom
maschwenk:maschwenk/fix-git-tag-log-parsing
Open

Suppress verbose git checkout --detached output with --quiet#2379
maschwenk wants to merge 4 commits intoactions:mainfrom
maschwenk:maschwenk/fix-git-tag-log-parsing

Conversation

@maschwenk
Copy link

@maschwenk maschwenk commented Feb 25, 2026

Summary

When actions/checkout runs against a large repository, git checkout --detach outputs every file being written to the log.

image image

For repos with thousands of files this floods the GitHub Actions log. For our repo this was something like 80k log lines. Why does this matter? Because when Agents read Github Actions logs (which are already chatty) they can easily consume 80k lines of noise for no reason. There are methods for avoiding that, but this output also seems low-value as-is.

In this PR:

I initially was just going to target checkoutDetach but then realized there was an existing progress config. I figured maybe a more holistic approach would be to reuse this concept. So I have:

  • Replaced --progress with --quiet in checkout() to suppress per-file output during checkout
  • Add --quiet to checkoutDetach() for the same reason
  • Thread showProgress through checkout() and checkoutDetach() so callers can still opt into --progress output; default remains --quiet
  • Fix fetchOptions.showProgress not being set in git-source-provider.ts (was always undefined, so --progress was never applied to fetch either)
  • Broaden show-progress description from fetch-specific to all git operations

Users can set show-progress: true (the default) to keep verbose output, or show-progress: false to quiet all git operations.

Alternatively, can keep this very directly constrained to the detached checkout

(note to self, do not rebase this branch as we are referencing it a specific commit in it already)

maschwenk and others added 4 commits February 25, 2026 18:15
Replace --progress with --quiet in checkout() and add --quiet to
checkoutDetach() to prevent per-file output from flooding CI logs
on large repositories.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Make checkout() and checkoutDetach() accept showProgress so callers
  can opt into --progress output; default remains --quiet
- Pass settings.showProgress to checkout() from git-source-provider
- Fix fetchOptions.showProgress not being set (was always undefined)
- Rebuild dist

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@maschwenk maschwenk changed the title Suppress verbose checkout output with --quiet Suppress verbose git checkout --detached output with --quiet Feb 26, 2026
@nagypeterjob
Copy link

good stuff, +1 for merging this 👍🏻

@maschwenk maschwenk marked this pull request as ready for review February 26, 2026 19:03
Comment on lines 80 to +81
show-progress:
description: 'Whether to show progress status output when fetching.'
description: 'Whether to show progress status output for git operations.'
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

show-progress does not really imply this is exclusively related to fetch. Only this little helptext.

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