Skip to content

Commit bd1c66f

Browse files
committed
Merge bitcoin/bitcoin#29461: ci: avoid running git diff after patching
84388c9 ci: avoid running git diff after patching (Ryan Ofsky) Pull request description: Drop `git diff` command so it is easier to run CI locally if git checkout is a worktree. Currently it fails because the directory is not recognized as a git repository. The `git diff` command was added recently in #28359 commit fa07ac4 and can be avoided just by teeing the patch to stdout ACKs for top commit: maflcko: lgtm ACK 84388c9 TheCharlatan: ACK 84388c9 Tree-SHA512: 089c8ff62f9c56a1df06686e72420a9a54a079d2ef9eaf7c9cfcd97cb5cce50c8c169890e599ef875aaf1ee426f590851b1f19d6c9e386671460ee6507d8d872
2 parents 1ac627c + 84388c9 commit bd1c66f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ci/test/03_test_script.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ export HOST=${HOST:-$("$BASE_ROOT_DIR/depends/config.guess")}
3636
# CI, so as a temporary minimal fix to work around UB and CI failures, leave
3737
# bytes_written unmodified.
3838
# See https://github.com/bitcoin/bitcoin/pull/28359#issuecomment-1698694748
39-
echo 'diff --git a/src/leveldb/db/db_impl.cc b/src/leveldb/db/db_impl.cc
40-
index 65e31724bc..f61b471953 100644
39+
# Tee patch to stdout to make it clear CI is testing modified code.
40+
tee >(patch -p1) <<'EOF'
4141
--- a/src/leveldb/db/db_impl.cc
4242
+++ b/src/leveldb/db/db_impl.cc
4343
@@ -1028,9 +1028,6 @@ Status DBImpl::DoCompactionWork(CompactionState* compact) {
@@ -49,8 +49,8 @@ index 65e31724bc..f61b471953 100644
4949
- }
5050
5151
mutex_.Lock();
52-
stats_[compact->compaction->level() + 1].Add(stats);' | patch -p1
53-
git diff
52+
stats_[compact->compaction->level() + 1].Add(stats);
53+
EOF
5454
)
5555

5656
if [ "$RUN_FUZZ_TESTS" = "true" ]; then

0 commit comments

Comments
 (0)