How the show-progress Option Affects actions/checkout Output
When set to true (the default), the show-progress option passes the --progress flag to Git commands, displaying real-time download statistics and object counts in the GitHub Actions log; when set to false, Git runs silently and only high-level action messages appear.
The actions/checkout repository provides the official GitHub Action for checking out code, and includes a show-progress input that controls the verbosity of Git output during the checkout process. This option directly affects whether developers see detailed progress indicators or minimal log output during workflow execution, without changing the actual repository contents.
How show-progress Controls Git Output
The show-progress input is a boolean that defaults to true. When enabled, it appends the --progress flag to underlying Git commands such as git fetch, git init, and git checkout. This flag instructs Git to emit real-time progress information—including download percentages, object reception counts, and network throughput statistics—to standard error, which the GitHub Actions runner captures and displays in the step log.
Implementation in the Source Code
The conditional logic for progress output spans two critical files in the actions/checkout repository.
Input Parsing (src/input-helper.ts)
In src/input-helper.ts at line 136, the action reads the show-progress input from the workflow configuration and normalizes it to a boolean value. This parsed value propagates through the action's internal configuration object to determine whether the --progress flag should be used.
Git Command Construction (src/git-command-manager.ts)
The src/git-command-manager.ts file (lines 45-53) constructs the actual Git command-line arguments. When the show-progress option evaluates to true, the code appends --progress to the argument list. Conversely, when set to false, this flag is omitted entirely, causing Git to run in its default silent mode for non-terminal environments.
Configuration Examples
Default Behavior (show-progress: true)
When using the default configuration:
steps:
- uses: actions/checkout@v4
The log displays granular Git progress:
Receiving objects: 45% (123/274), 1.23 MiB | 2.45 MiB/s
Resolving deltas: 100% (45/45), done.
Disabling Progress Output (show-progress: false)
To suppress detailed progress information:
steps:
- uses: actions/checkout@v4
with:
show-progress: false
The log shows only high-level action messages:
##[group]Run actions/checkout@v4
Fetching changes...
Checking out SHA ...
Summary
- The
show-progressoption controls the--progressflag passed to Git commands inactions/checkout. - Default value is
true, enabling detailed real-time progress logging. - Set to
falseto reduce log verbosity while maintaining identical checkout functionality. - Implementation spans
src/input-helper.ts(input parsing) andsrc/git-command-manager.ts(command construction).
Frequently Asked Questions
Does setting show-progress to false make the checkout faster?
No. The show-progress option only affects log output verbosity. According to the actions/checkout source code, the flag is purely cosmetic—it controls whether the --progress flag is appended to Git commands. The actual network transfer and file system operations remain identical regardless of this setting.
What Git commands are affected by the show-progress option?
The option affects multiple Git commands executed during the checkout process, including git init, git fetch, and git checkout. In src/git-command-manager.ts, the --progress flag is conditionally added to these commands when the option is enabled.
Is show-progress enabled by default in actions/checkout v4?
Yes. As implemented in src/input-helper.ts at line 136, the show-progress input defaults to true when not explicitly specified in the workflow file. This ensures backward compatibility with existing workflows that expect detailed Git output.
Can I use show-progress with self-hosted runners?
Yes. The show-progress option functions identically on GitHub-hosted and self-hosted runners. The behavior depends solely on the Git version present on the runner machine, as the action simply passes the --progress flag to standard Git commands.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →