Skip to content

Commit 25502e1

Browse files
committed
scrub: some left over fixes
These fixes were in intermediate merge commits intended to be squashed into the PR that would have been merged after as it was rebased, and some things that slipped through the cracks. Remove conflict_skip map and per-commit skip check in check_one_commit, commits are filtered ahead of time. Remove some straggler /dev/null redirects
1 parent f100d6a commit 25502e1

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

contrib/scrub-commit-history.sh

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -347,10 +347,6 @@ expect_fail_matches_checks() {
347347
# Appends to build_failed[] on failure.
348348
check_one_commit() {
349349
local hash=$1
350-
if [ -n "${conflict_skip[$hash]:-}" ]; then
351-
echo " - $(fmt_commit "$hash") (skipped: conflict)"
352-
return 0
353-
fi
354350
if [ -n "${no_flake[$hash]:-}" ]; then
355351
if [ "$no_skip_missing" = true ]; then
356352
echo "$(fmt_commit "$hash") (no flake.nix)"
@@ -441,9 +437,9 @@ echo "Checking for conflicts..."
441437
for idx in "${ordered[@]}"; do
442438
hash=${linear[$idx]}
443439
reason=""
444-
if git ls-tree --name-only "$hash" 2>/dev/null | grep -qE '^\.jj(conflict-|-do-not-resolve)'; then
440+
if git ls-tree --name-only "$hash" | grep -qE '^\.jj(conflict-|-do-not-resolve)'; then
445441
reason="jj conflict tree"
446-
elif git grep -q -E '<{7}|>{7}|={7}' "$hash" -- 2>/dev/null; then
442+
elif git grep -q -E '<{7}|>{7}|={7}' "$hash" --; then
447443
reason="conflict markers"
448444
fi
449445
if [ -n "$reason" ]; then
@@ -502,8 +498,8 @@ if git cat-file -e "$tip_hash:.gitignore" 2>/dev/null; then
502498
echo "Checking gitignore monotonicity..."
503499
for idx in "${ordered[@]}"; do
504500
hash=${linear[$idx]}
505-
leaked=$(git ls-tree -r --name-only "$hash" 2>/dev/null |
506-
git -C "$tmpdir/repo" check-ignore --stdin 2>/dev/null || true)
501+
leaked=$(git ls-tree -r --name-only "$hash" |
502+
git -C "$tmpdir/repo" check-ignore --stdin || true)
507503
if [ -n "$leaked" ]; then
508504
first=$(echo "$leaked" | head -1)
509505
count=$(echo "$leaked" | wc -l)

0 commit comments

Comments
 (0)