Repository navigation
fix: quiet git clone/fetch ref spam in drupal-core/drupal-contrib setup logs (#218) - #221
Merged
Merged
Conversation
…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>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Issue
When a
drupal-coreworkspace clones Drupal core, everygit fetch/git cloneprints one line per new branch and tag. Core has about 44 branches and 800 tags, so/tmp/drupal-setup.loggets well over a thousand lines of* [new tag] 7.0 -> 7.0before the useful output. This buried the composer PHP-version error in #217.How This PR Solves The Issue
git clone/git fetchindrupal-coreanddrupal-contribsetup now uses-q. Errors still go to stderr and are appended to the log, so failures stay visible.git initandgit cleanare quiet too, which drops the default-branch hint block and the longRemoving ...list.Fetched origin (12s). A failed origin or issue-fork fetch used to be ignored silently by|| true; it now logs a ⚠ warning.--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
drupal-coreworkspace, once with default settings and once with an issue fork./tmp/drupal-setup.log. It should have no[new branch]or[new tag]lines, and should includeFetched local cache,Fetched originand (for issue forks)Fetched issue forkwith timings.fetch --all --prunestep should add no ref lines.drupal-contribworkspace, 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 validateandmake test-templatespass. I checked locally thatgit fetch -qwrites nothing when it succeeds, and that it still writes thefatal: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