Skip to content

fix: quiet git clone/fetch ref spam in drupal-core/drupal-contrib setup logs (#218) - #221

Merged
rfay merged 1 commit into
mainfrom
20261017_rfay_quiet_git_fetch
Oct 17, 2026
Merged

rfay merged 1 commit into
mainfrom
20261017_rfay_quiet_git_fetch

Conversation

@rfay

@rfay rfay commented Oct 17, 2026

Copy link
Copy Markdown
Member

The Issue

When a drupal-core workspace clones Drupal core, every git fetch/git clone prints one line per new branch and tag. Core has about 44 branches and 800 tags, so /tmp/drupal-setup.log gets well over a thousand lines of * [new tag] 7.0 -> 7.0 before the useful output. This buried the composer PHP-version error in #217.

How This PR Solves The Issue

  • Every git clone / git fetch in drupal-core and drupal-contrib setup now uses -q. Errors still go to stderr and are appended to the log, so failures stay visible. git init and git clean are quiet too, which drops the default-branch hint block and the long Removing ... list.
  • When the workspace is seeded from the bare cache, each fetch now writes one timed line to the log, for example Fetched origin (12s). A failed origin or issue-fork fetch used to be ignored silently by || true; it now logs a ⚠ warning.
  • Issue-fork remotes are added with --no-tags, since a fork's tags are the same as core's.

Refspecs are not narrowed. The Drupal 10 branch lookup (branch -r | grep 10.N.x) and switching branches inside the workspace both need every origin branch, and the bare cache already makes fetching them cheap.

Manual Testing Instructions

  1. Push the templates and create a fresh drupal-core workspace, once with default settings and once with an issue fork.
  2. Check /tmp/drupal-setup.log. It should have no [new branch] or [new tag] lines, and should include Fetched local cache, Fetched origin and (for issue forks) Fetched issue fork with timings.
  3. Restart the workspace and check the log again: the fetch --all --prune step should add no ref lines.
  4. Create a drupal-contrib workspace, with and without an issue fork, and check that its log has no ref lines either.

Automated Testing Overview

There are no new tests, because this only changes git verbosity and logging. make validate and make test-templates pass. I checked locally that git fetch -q writes nothing when it succeeds, and that it still writes the fatal: line to the log when it fails.

Release/Deployment Notes

The template change takes effect with make push-all-templates. No image rebuild is needed.

🤖 Generated with Claude Code

…up logs (#218)

Drupal core has ~44 branches and ~800 tags, and each fetch printed one
line per new ref into /tmp/drupal-setup.log, burying real failures such
as the composer PHP-version error in #217.

- Add -q to every git clone/fetch (and init/clean) in the setup scripts.
  Errors still go to stderr and are appended to the log.
- Log one timed summary line per fetch in the bare-cache path, and warn
  instead of silently ignoring a failed origin/issue fetch.
- Add issue-fork remotes with --no-tags; their tags duplicate core's.

Refspecs are not narrowed: Drupal 10 branch resolution and in-workspace
branch switching rely on all origin branches, which the bare cache
provides cheaply.

Fixes #218

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-10-17 20:38 UTC

@rfay
rfay merged commit 1fc23eb into main Oct 17, 2026
24 of 30 checks passed
@rfay
rfay deleted the 20261017_rfay_quiet_git_fetch branch October 17, 2026 20:37
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.

1 participant