I ran through all 313 historical scripted-diff:
commits as of 71b63195b30b2fa0dff20ebb262ce7566dd5d673.
I found several that don’t pass, none are problematic:
- fa21fc60c292ab947b2200e54201440f16230566 (2022): fails because of missing file. Works if you run it manually and drop
ren nSinceLastTry
. It was indirectly noticed during review: #24697 (review) - 3aa258109e3f3e0b1bfc4f811cbadfd6d516208c (2022): commit message misses a trailing
-
, but script does work - f471a3be00c2b6433b8c258b716982c0539da13f (2020):
scripted diff
instead ofscripted-diff
marker. I can’t get the script to run, but the commit just changes a few RPC strings. - fb65dde147f63422c4148b089c2f5be0bf5ba80f (2021): throws “sed: no input files” a few times, but does produce the right result
- fa9d5902f7d72e8cce105dd1b1f5a1062e304b10 (2020): uses
clang-format-diff
which presumably has changed over time - 728667b771e80388812d521eca03682c9366ce4b (2018): malformed commit message, but works
I don’t think any action is required, other than perhaps double checking that merge scripts always run this. So this can be closed soon(tm).
I also found two instances that pass on Ubuntu, but not on macOS (despite having GNU sed and grep, see #29689):
- f0a2fb3c5dbf3c4bec7faf934baff3e723734b3f (2022): and several others in this PR
- 3704433c4f5ecf9f196860b2ccecae0d2c8b5f6e (2020): and several others in this PR
On macOS 14.4 with git 2.44.0 (via homebrew) and GNU grep 3.11 the line find_regex="\bpindexBestHeader\b" git grep -l -E "$find_regex" -- src
returns nothing. Tried with bash and zsh. Doesn’t really matter anymore.
Check for yourself (mostly copied from verify-commits.py
):
(but be careful because you’re about to run 300+ bash scripts)
0#!/bin/sh
1set -e
2for commit in $(git rev-list HEAD); do
3 # Skip known failures
4 if test "$commit" = "fa21fc60c292ab947b2200e54201440f16230566"; then continue; fi
5 if test "$commit" = "3aa258109e3f3e0b1bfc4f811cbadfd6d516208c"; then continue; fi
6 if test "$commit" = "f471a3be00c2b6433b8c258b716982c0539da13f"; then continue; fi
7 if test "$commit" = "fb65dde147f63422c4148b089c2f5be0bf5ba80f"; then continue; fi
8 if test "$commit" = "fa9d5902f7d72e8cce105dd1b1f5a1062e304b10"; then continue; fi
9 if test "$commit" = "728667b771e80388812d521eca03682c9366ce4b"; then continue; fi
10
11 if git rev-list -n 1 --pretty="%s" "$commit" | grep -q "^scripted-diff:"; then
12 git checkout --quiet "$commit"^ || exit
13 SCRIPT="$(git rev-list --format=%b -n1 "$commit" | sed '/^-BEGIN VERIFY SCRIPT-$/,/^-END VERIFY SCRIPT-$/{//!b};d')"
14 if test -z "$SCRIPT"; then
15 echo "Error: missing script for: $commit"
16 echo "Failed"
17 exit 1
18 else
19 echo "Running script for: $commit"
20 # If PyEnv is installed, ignore missing Python versions
21 # for (a few) scripts that use Python
22 if test -f ".python-version"; then
23 pyenv local 3.12.1
24 fi
25 echo "$SCRIPT"
26 (eval "$SCRIPT")
27 if test -f ".python-version"; then
28 git checkout HEAD .python-version
29 fi
30 git --no-pager diff --exit-code "$commit" && echo "OK" || (echo "Failed"; exit 1)
31 fi
32 git reset --quiet --hard HEAD
33 else
34 if git rev-list "--format=%b" -n1 "$commit" | grep -q '^-\(BEGIN\|END\)[ a-zA-Z]*-$'; then
35 echo "Error: script block marker but no scripted-diff in title of commit $commit"
36 echo "Failed"
37 exit 1
38 fi
39 fi
40done