From e575364ae613c5e208862350c48a60e6234b3086 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Wed, 28 May 2025 13:12:19 +0200 Subject: [PATCH] workflows/check-cherry-picks: reduce checkout time Using a `tree:0` filter instead of `blob:none` reduces the checkout time from over 3 minutes to about 45 seconds. The required trees/blobs will then be fetched on-demand. This on-demand fetching creates additional output for `git range-diff` on stderr, so we hide that. This only happens the first time it's run, so we don't need to adjust the other calls - which will still return any real errors, should they happen. --- .github/workflows/check-cherry-picks.yml | 2 +- ci/check-cherry-picks.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-cherry-picks.yml b/.github/workflows/check-cherry-picks.yml index 5bd93ee4bbf9..3c6ef1d18920 100644 --- a/.github/workflows/check-cherry-picks.yml +++ b/.github/workflows/check-cherry-picks.yml @@ -20,7 +20,7 @@ jobs: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: fetch-depth: 0 - filter: blob:none + filter: tree:0 path: trusted - name: Check cherry-picks diff --git a/ci/check-cherry-picks.sh b/ci/check-cherry-picks.sh index dd8e9bb0ca19..580d6da6a38e 100755 --- a/ci/check-cherry-picks.sh +++ b/ci/check-cherry-picks.sh @@ -59,7 +59,7 @@ while read -r new_commit_sha ; do '"$new_commit_sha~..$new_commit_sha"' ' - if $range_diff_common --no-color | grep -E '^ {4}[+-]{2}' > /dev/null ; then + if $range_diff_common --no-color 2> /dev/null | grep -E '^ {4}[+-]{2}' > /dev/null ; then if [ "$GITHUB_ACTIONS" = 'true' ] ; then echo ::endgroup:: echo -n "::warning ::"