Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
bump: minor
---

### Added

- `/source-control:pull-request ready`: `pr-worktree.sh` and `verify-gate.sh` take `--dir <checkout>`, as `target-repo.sh` does. `pr-worktree.sh` reads the PR's head and lists worktrees in that checkout, and `verify-gate.sh` finds the common git directory there (`READY_VERIFY_DIR` still wins). The ready phase's command lines pass `--dir`, so a session that works on a repository by absolute path, with its shell in another checkout, finds the PR's worktree and the verify record. Without `--dir`, both scripts use the current directory as before.
Original file line number Diff line number Diff line change
Expand Up @@ -211,18 +211,21 @@ SHA, so they work in any repository without knowing its CI file name. A run list
SHA means the push's event reached the workflows; the wait never looks at a run's result. The push
starts one run per workflow, possibly a few seconds apart, so the wait ends only when the count is
above zero and unchanged across two polls, keeping a late sibling out of the flip's snapshot. Skip
the wait when the head is unchanged, but still run the `HEAD_SHA` assignment, which the flip block
reads.
the wait when the head is unchanged, but still run the `PR_TREE` and `HEAD_SHA` assignments, which
the flip block reads.

`HEAD_SHA` is the PR worktree's HEAD, the commit the verify gate recorded: `pr-worktree.sh`
finds the worktree that has the PR's head branch checked out with the PR's head commit in its
history, whichever checkout the shell sits in, and exits non-zero when none has. GitHub's
history, whichever checkout the shell sits in, and exits non-zero when none has. `<checkout>` is
the checkout the phase names
([PR worktree](../../../../skills/pull-request/reference/ready-for-review.md#253-review-and-verify-the-updated-head)),
and the flip's `verify-gate.sh check` reads the record through `--dir "$PR_TREE"`. GitHub's
`headRefOid` can lag a push by a read, so the block polls the PR's head until it equals
`HEAD_SHA`, up to 60 seconds, instead of trusting the first read. A head that never matches (a peer push, a push that failed, local commits never
pushed) leaves `HEAD_MATCH=0`, and the flip below refuses.

```bash
PR_TREE=$(bash "<skill-dir>/scripts/pr-worktree.sh" --pr "$PR_NUMBER") || exit 1
PR_TREE=$(bash "<skill-dir>/scripts/pr-worktree.sh" --pr "$PR_NUMBER" --dir "<checkout>") || exit 1
HEAD_SHA=$(git -C "$PR_TREE" rev-parse HEAD) || exit 1
HEAD_MATCH=0
for _ in $(seq 12); do # 12 polls x 5 s = 60 s
Expand Down Expand Up @@ -257,7 +260,7 @@ RUNS_BEFORE=$(gh run list --commit "$HEAD_SHA" --event pull_request -L 100 \
--json databaseId -q 'map(.databaseId)') || RUNS_BEFORE='[]'
[ "$HEAD_MATCH" = 1 ] &&
[ "$(gh pr view "$PR_NUMBER" --json headRefOid -q '.headRefOid')" = "$HEAD_SHA" ] &&
bash "<skill-dir>/scripts/verify-gate.sh" check --head "$HEAD_SHA" &&
bash "<skill-dir>/scripts/verify-gate.sh" check --head "$HEAD_SHA" --dir "$PR_TREE" &&
Comment thread
melodic-automation-lanes[bot] marked this conversation as resolved.
Resolved
gh pr ready "$PR_NUMBER" -R "$REPO"
```

Expand All @@ -277,7 +280,7 @@ route, guarded the same way:
```bash
[ "$HEAD_MATCH" = 1 ] &&
[ "$(gh pr view "$PR_NUMBER" --json headRefOid -q '.headRefOid')" = "$HEAD_SHA" ] &&
bash "<skill-dir>/scripts/verify-gate.sh" check --head "$HEAD_SHA" &&
bash "<skill-dir>/scripts/verify-gate.sh" check --head "$HEAD_SHA" --dir "$PR_TREE" &&
gh api --method POST "repos/$REPO/pulls/$PR_NUMBER/ccr/ready_for_review"
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -388,10 +388,13 @@ prose cannot stop the flip, a script in the flip's own shell command can.

**The PR worktree** is the checkout that has the PR's head branch checked out, which need not be
the one the shell sits in: a session in the main checkout can run `ready <pr>` for a PR built in
another worktree. `scripts/pr-worktree.sh --pr "$PR_NUMBER"` prints its path: the worktree
`git worktree list` shows on the PR's head branch, whose HEAD contains the PR's head commit. A
shell already in the PR's worktree gets its own top level back, so the gate runs as it would from
there. When no worktree has the head branch checked out, or the one that has it lacks the head
another worktree. `scripts/pr-worktree.sh --pr "$PR_NUMBER" --dir "<checkout>"` prints its path:
the worktree `git worktree list` shows on the PR's head branch, whose HEAD contains the PR's head
commit. `<checkout>` is the path of the checkout of the PR's repository the session works on
(absolute, or `.` when the shell sits in it), so the script never depends on the shell's directory. A
`<checkout>` inside the PR's worktree gets that worktree's top level back, so the
gate runs as it would from there. Each `verify-gate.sh` call names `--dir "$PR_TREE"` for the same
reason. When no worktree has the head branch checked out, or the one that has it lacks the head
commit (another branch of that name, such as a fork's `main` beside this repository's), the script
exits 2 and each record command below records nothing, so 2.5.4 refuses the flip: check the PR out
with the forge's PR checkout and run the gate again.
Expand All @@ -402,7 +405,7 @@ PR worktree's HEAD ([review-venue.md](review-venue.md)), unless the run was invo
full:

```bash
PR_TREE=$(bash "<skill-dir>/scripts/pr-worktree.sh" --pr "$PR_NUMBER") || exit 1; bash "<skill-dir>/scripts/review-venue.sh" --head "$(git -C "$PR_TREE" rev-parse HEAD)"
PR_TREE=$(bash "<skill-dir>/scripts/pr-worktree.sh" --pr "$PR_NUMBER" --dir "<checkout>") || exit 1; bash "<skill-dir>/scripts/review-venue.sh" --head "$(git -C "$PR_TREE" rev-parse HEAD)"
```

When it reads `tests ci healthy`, CI already ran the test suites on the commit 2.5.4 flips. Skip
Expand All @@ -425,7 +428,7 @@ it was ready. `ci-status` gates the merge either way.
depends on the shell's directory, and the record names that tree's HEAD:

```bash
PR_TREE=$(bash "<skill-dir>/scripts/pr-worktree.sh" --pr "$PR_NUMBER") || exit 1; if CHECK_DATA_ROOT="$PR_TREE" bash "$PR_TREE/scripts/check-affected.sh" --tests; then R=pass; else R=fail; fi; bash "<skill-dir>/scripts/verify-gate.sh" record --head "$(git -C "$PR_TREE" rev-parse HEAD)" --result "$R"
PR_TREE=$(bash "<skill-dir>/scripts/pr-worktree.sh" --pr "$PR_NUMBER" --dir "<checkout>") || exit 1; if CHECK_DATA_ROOT="$PR_TREE" bash "$PR_TREE/scripts/check-affected.sh" --tests; then R=pass; else R=fail; fi; bash "<skill-dir>/scripts/verify-gate.sh" record --dir "$PR_TREE" --head "$(git -C "$PR_TREE" rev-parse HEAD)" --result "$R"
```

When the venue's `tests` line read `ci` (above), drop `--tests` from the command, so the suites
Expand All @@ -440,7 +443,7 @@ it was ready. `ci-status` gates the merge either way.
still names the skip or the disabling (2.5.6).

```bash
PR_TREE=$(bash "<skill-dir>/scripts/pr-worktree.sh" --pr "$PR_NUMBER") || exit 1; bash "<skill-dir>/scripts/verify-gate.sh" record --head "$(git -C "$PR_TREE" rev-parse HEAD)" --result skipped # or --result fail
PR_TREE=$(bash "<skill-dir>/scripts/pr-worktree.sh" --pr "$PR_NUMBER" --dir "<checkout>") || exit 1; bash "<skill-dir>/scripts/verify-gate.sh" record --dir "$PR_TREE" --head "$(git -C "$PR_TREE" rev-parse HEAD)" --result skipped # or --result fail
```

Completion criterion, for each step that ran: any review evidence the plan asks for is linked,
Expand Down Expand Up @@ -578,5 +581,5 @@ PR in draft, and the `verify` gate's record for the head is a separate file this
reads or writes.

```bash
PR_TREE=$(bash "<skill-dir>/scripts/pr-worktree.sh" --pr "$PR_NUMBER") || exit 1; PR_HEAD=$(git -C "$PR_TREE" rev-parse HEAD) || exit 1; bash "<skill-dir>/scripts/confirm-verdict.sh" show --head "$PR_HEAD"; bash "<skill-dir>/scripts/confirm-verdict.sh" show --of measure --head "$PR_HEAD"
PR_TREE=$(bash "<skill-dir>/scripts/pr-worktree.sh" --pr "$PR_NUMBER" --dir "<checkout>") || exit 1; PR_HEAD=$(git -C "$PR_TREE" rev-parse HEAD) || exit 1; bash "<skill-dir>/scripts/confirm-verdict.sh" show --head "$PR_HEAD"; bash "<skill-dir>/scripts/confirm-verdict.sh" show --of measure --head "$PR_HEAD"
```
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@
# top level back.
#
# Usage:
# pr-worktree.sh --pr <number>
# pr-worktree.sh --pr <number> [--dir <checkout>]
#
# --dir names any checkout of the PR's repository; both the head read and the worktree list run
# against it. Default: the current directory.
#
# Exit codes:
# 0 the worktree's absolute path is on stdout
# 1 invalid argument
# 1 invalid argument, or --dir names no directory
# 2 the head branch or commit could not be read, or no worktree has the branch checked out
# with the head commit in its history

Expand All @@ -32,7 +35,7 @@ die() {
exit "$1"
}

PR=""
PR="" DIR=""
while (($# > 0)); do
case "$1" in
-h | --help) usage ;;
Expand All @@ -41,12 +44,19 @@ while (($# > 0)); do
PR="$2"
shift 2
;;
--dir)
(($# >= 2)) && [[ -n "$2" && -z "$DIR" ]] || die 1 "--dir needs one value and is given once"
DIR="$2"
shift 2
;;
*) die 1 "unknown argument $(printf '%q' "$1") (use --help)" ;;
esac
done
[[ "$PR" =~ ^[0-9]+$ ]] || die 1 "--pr needs a pull request number"
DIR="${DIR:-.}"
[[ -d "$DIR" ]] || die 1 "--dir $(printf '%q' "$DIR") is not a directory"

HEAD_READ=$(gh pr view "$PR" --json headRefName,headRefOid -q '.headRefName + " " + .headRefOid' 2>/dev/null | tr -d '\r') ||
HEAD_READ=$(CDPATH='' cd -- "$DIR" && gh pr view "$PR" --json headRefName,headRefOid -q '.headRefName + " " + .headRefOid' 2>/dev/null | tr -d '\r') ||
die 2 "the head branch of PR $PR could not be read"
read -r BRANCH HEAD_OID <<<"$HEAD_READ"
[[ -n "${BRANCH:-}" && "${HEAD_OID:-}" =~ ^[0-9a-f]{40}$ ]] || die 2 "the head branch and commit of PR $PR could not be read"
Expand All @@ -65,6 +75,6 @@ while IFS= read -r LINE; do
;;
*) ;;
esac
done < <(git worktree list --porcelain 2>/dev/null)
done < <(git -C "$DIR" worktree list --porcelain 2>/dev/null)

die 2 "PR $PR's head branch '$BRANCH' is checked out in no worktree of this repository; check it out with the forge's PR checkout, then run the gate again"
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,27 @@ assert_exit "--pr given twice is a usage error" 1 "$?"
bash "$SCRIPT" --bogus >/dev/null 2>&1
assert_exit "an unknown argument is a usage error" 1 "$?"

# The verify gate command of the ready reference (2.5.3), run from the main checkout.
GATE=$(grep -F 'pr-worktree.sh" --pr' "$REF" | grep -F 'check-affected.sh" --tests' | sed -e 's/^ *//' -e "s#<skill-dir>#$SKILL_DIR#g")
# --dir names the checkout, so a shell outside every checkout finds the PR's worktree.
OUTSIDE="$TEST_TMPDIR/outside"
mkdir -p "$OUTSIDE"
out=$(cd "$OUTSIDE" && bash "$SCRIPT" --pr 7 --dir "$MAIN")
assert_exit "with --dir from outside the checkout: the PR's worktree is found" 0 "$?"
assert_eq "with --dir from outside the checkout: the path is the PR's worktree" "$PR_WT_REAL" "$(physical_dir "$out")"
out=$(cd "$OUTSIDE" && bash "$SCRIPT" --dir "$PR_WT" --pr 7)
assert_exit "with --dir naming the PR's worktree: found" 0 "$?"
assert_eq "with --dir naming the PR's worktree: its own top level comes back" "$PR_WT_REAL" "$(physical_dir "$out")"
(cd "$OUTSIDE" && bash "$SCRIPT" --pr 7 >/dev/null 2>&1)
assert_exit "without --dir, a shell outside every checkout finds no worktree" 2 "$?"
bash "$SCRIPT" --pr 7 --dir >/dev/null 2>&1
assert_exit "--dir without a value is a usage error" 1 "$?"
bash "$SCRIPT" --pr 7 --dir "$TEST_TMPDIR/missing" >/dev/null 2>&1
assert_exit "--dir naming no directory is a usage error" 1 "$?"
bash "$SCRIPT" --pr 7 --dir "$MAIN" --dir "$PR_WT" >/dev/null 2>&1
assert_exit "--dir given twice is a usage error" 1 "$?"

# The verify gate command of the ready reference (2.5.3), with <checkout> naming the main checkout,
# run from that checkout and from outside every checkout.
GATE=$(grep -F 'pr-worktree.sh" --pr' "$REF" | grep -F 'check-affected.sh" --tests' | sed -e 's/^ *//' -e "s#<skill-dir>#$SKILL_DIR#g" -e "s#<checkout>#$MAIN#g")
if [[ -z "$GATE" ]]; then
echo "FAIL: the verify gate command was not found in $REF" >&2
exit 1
Expand All @@ -114,6 +133,12 @@ assert_contains "the gate output lists the PR's changed files" "$out" "changed:
assert_eq "the gate records a pass for the PR worktree's HEAD" "pass" "$(cat "$READY_VERIFY_DIR/$PR_HEAD" 2>/dev/null)"
assert_file_absent "nothing is recorded for the main checkout's HEAD" "$READY_VERIFY_DIR/$MAIN_HEAD"

rm -rf "$READY_VERIFY_DIR"
out=$(cd "$OUTSIDE" && PR_NUMBER=7 bash -c "$GATE" 2>&1)
assert_exit "the gate command from outside every checkout succeeds" 0 "$?"
assert_contains "from outside: the gate checks the PR's worktree" "$out" "checked $PR_WT_REAL"
assert_eq "from outside: the gate records a pass for the PR worktree's HEAD" "pass" "$(cat "$READY_VERIFY_DIR/$PR_HEAD" 2>/dev/null)"

rm -rf "$READY_VERIFY_DIR"
out=$(cd "$MAIN" && STUB_BRANCH=feat/elsewhere PR_NUMBER=7 bash -c "$GATE" 2>&1)
assert_exit "the gate command for a head checked out nowhere fails" 1 "$?"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ source "$SCRIPT_DIR/../../../scripts/test-helpers.sh"
REPORT_REF="$SKILL_DIR/reference/ready-for-review.md"

# block <heading> [<n>] [<file>]: the nth (default first) fenced block in that heading's section
# of <file> (default: the GitHub ready reference), with <skill-dir> filled in.
# of <file> (default: the GitHub ready reference), with <skill-dir> filled in and <checkout> read
# from FLOW_CHECKOUT when the block runs (default: the shell's directory).
block() {
# shellcheck disable=SC2016 # ${FLOW_CHECKOUT:-.} expands in the generated script
awk -v h="$1" -v n="${2:-1}" '$0 == h { on = 1; next } on && !f && /^## / { exit }
on && /^```bash/ { if (++i == n) f = 1; next } f && /^```/ { exit } f' "${3:-$REF}" |
sed "s#<skill-dir>#$SKILL_DIR#g"
sed -e "s#<skill-dir>#$SKILL_DIR#g" -e 's#<checkout>#${FLOW_CHECKOUT:-.}#g'
}

FLOW="$TEST_TMPDIR/flow.sh"
Expand Down Expand Up @@ -62,9 +64,15 @@ mkdir -p "$STUB_DIR"
printf '#!/usr/bin/env bash\nexit 0\n' >"$STUB_DIR/sleep"
# The forge's first head read returns STUB_STALE, later reads STUB_FORGE (default: the pushed
# commit); pr-worktree.sh's head read returns STUB_BRANCH and STUB_OID. Runs exist only for the pushed commit, and a new one only once the PR is flipped. Each
# run list logs the commit it asked about; `pr ready` logs the flip.
# run list logs the commit it asked about; `pr ready` logs the flip. A call that names neither
# `-R acme/tool` nor GH_REPO=acme/tool fails, as gh does outside a checkout, so a read the
# reference leaves untargeted cannot pass by the stub's grace.
cat >"$STUB_DIR/gh" <<'STUB_EOF'
#!/usr/bin/env bash
if [[ "${GH_REPO:-}" != acme/tool && " $* " != *" -R acme/tool "* ]]; then
echo "stub gh: no repository named for: $*" >&2
exit 1
fi
case "$1 $2" in
"pr view")
if [[ "$*" == *headRefName* ]]; then
Expand Down Expand Up @@ -108,10 +116,13 @@ new_state() {

# run_flow <stale-head> <head-before> [<later-forge-head>], in the state new_state made, from
# $FLOW_CWD (default: the PR's checkout), with pr-worktree.sh reading STUB_OID (default: the
# pre-push head, as a lagging read returns it).
# pre-push head, as a lagging read returns it), and GH_REPO exported as the reference's "Find the
# PR for the branch" block exports it (FLOW_GH_REPO, default acme/tool; empty leaves it unset).
STUB_BRANCH=$(git -C "$REPO" branch --show-current)
run_flow() {
(cd "${FLOW_CWD:-$REPO}" && PATH="$STUB_DIR:$PATH" STUB_STATE="$STATE" STUB_STALE="$1" STUB_PUSHED="$PUSHED" \
(unset GH_REPO
[[ -z "${FLOW_GH_REPO-acme/tool}" ]] || export GH_REPO="${FLOW_GH_REPO-acme/tool}"
cd "${FLOW_CWD:-$REPO}" && PATH="$STUB_DIR:$PATH" FLOW_CHECKOUT="${FLOW_CHECKOUT:-.}" STUB_STATE="$STATE" STUB_STALE="$1" STUB_PUSHED="$PUSHED" \
STUB_FORGE="${3:-$PUSHED}" STUB_BRANCH="$STUB_BRANCH" STUB_OID="${STUB_OID:-$BEFORE}" \
READY_VERIFY_DIR="$STATE/verify" PR_NUMBER=5 REPO=acme/tool HEAD_BEFORE="$2" timeout 30 bash "$FLOW" 2>&1)
}
Expand Down Expand Up @@ -139,7 +150,7 @@ assert_contains "a record for the pre-push commit only: the guard refuses" "$out
# changes the verify gate's result for that head.
confirm_record() { CONFIRM_VERDICT_DIR="$STATE/confirm" bash "$SKILL_DIR/scripts/confirm-verdict.sh" record "$@"; }
run_report() {
(cd "$REPO" && PATH="$STUB_DIR:$PATH" STUB_STATE="$STATE" STUB_BRANCH="$STUB_BRANCH" STUB_OID="$PUSHED" \
(cd "$REPO" && PATH="$STUB_DIR:$PATH" GH_REPO=acme/tool STUB_STATE="$STATE" STUB_BRANCH="$STUB_BRANCH" STUB_OID="$PUSHED" \
CONFIRM_VERDICT_DIR="$STATE/confirm" PR_NUMBER=5 timeout 30 bash "$REPORT" 2>&1)
}

Expand Down Expand Up @@ -229,6 +240,20 @@ out=$(FLOW_CWD="$TEST_TMPDIR/other" run_flow "$BEFORE" "$BEFORE")
assert_contains "from another checkout: HEAD_SHA is the PR worktree's HEAD" "$out" "HEAD_SHA=$PUSHED"
assert_contains "from another checkout: the guarded flip passes on the PR's head" "$out" "FLIP_EXIT=0"

# The shell sits outside every checkout and <checkout> names the repository by absolute path.
mkdir -p "$TEST_TMPDIR/outside"
new_state "$PUSHED"
out=$(FLOW_CWD="$TEST_TMPDIR/outside" FLOW_CHECKOUT="$REPO" run_flow "$BEFORE" "$BEFORE")
assert_contains "from outside every checkout: HEAD_SHA is the PR worktree's HEAD" "$out" "HEAD_SHA=$PUSHED"
assert_contains "from outside every checkout: the guarded flip passes on the PR's head" "$out" "FLIP_EXIT=0"

# The same shell without GH_REPO: the untargeted reads fail as gh fails outside a checkout, so the
# case above passes only because the reads follow the exported repository.
new_state "$PUSHED"
out=$(FLOW_GH_REPO='' FLOW_CWD="$TEST_TMPDIR/outside" FLOW_CHECKOUT="$REPO" run_flow "$BEFORE" "$BEFORE")
[[ -e "$STATE/flipped" ]] && flipped=yes || flipped=no
assert_eq "from outside every checkout without GH_REPO: the PR is not flipped" "no" "$flipped"

new_state "$PUSHED"
out=$(FLOW_CWD="$TEST_TMPDIR/other" STUB_BRANCH=gone run_flow "$BEFORE" "$BEFORE")
[[ -e "$STATE/flipped" ]] && flipped=yes || flipped=no
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,17 @@
# A result recorded for another head never counts, so a commit after the gate voids it.
#
# Usage:
# verify-gate.sh record --head <sha> --result pass|fail|skipped
# verify-gate.sh check --head <sha>
# verify-gate.sh record --head <sha> --result pass|fail|skipped [--dir <checkout>]
# verify-gate.sh check --head <sha> [--dir <checkout>]
#
# The result lives under the repository's common git directory (`ready-verify/<sha>`), shared by
# every worktree, so a record and a check agree whichever checkout the shell sits in; or under
# $READY_VERIFY_DIR when set.
# $READY_VERIFY_DIR when set. --dir names any checkout of the repository to read that directory
# from (default: the current directory); $READY_VERIFY_DIR still wins over it.
#
# Exit codes:
# 0 record: stored; check: `pass` or `skipped` recorded for the head
# 1 invalid argument
# 1 invalid argument, or --dir names no directory
# 2 check: no result recorded for the head, or the state cannot be read
# 3 check: the recorded result for the head is `fail`

Expand All @@ -43,22 +44,29 @@ record | check) CMD="$1" ;;
esac
shift

HEAD_SHA="" RESULT=""
HEAD_SHA="" RESULT="" CHECKOUT=""
while (($# > 0)); do
case "$1" in
--head | --result)
(($# >= 2)) || die 1 "$1 needs a value"
if [[ "$1" == --head ]]; then HEAD_SHA="$2"; else RESULT="$2"; fi
shift 2
;;
--dir)
(($# >= 2)) && [[ -n "$2" && -z "$CHECKOUT" ]] || die 1 "--dir needs one value and is given once"
CHECKOUT="$2"
shift 2
;;
*) die 1 "unknown argument $(printf '%q' "$1") (use --help)" ;;
esac
done
[[ "$HEAD_SHA" =~ ^[0-9a-f]{40}$ ]] || die 1 "--head must be a full 40-character commit sha"
CHECKOUT="${CHECKOUT:-.}"
[[ -d "$CHECKOUT" ]] || die 1 "--dir $(printf '%q' "$CHECKOUT") is not a directory"

dir="${READY_VERIFY_DIR:-}"
if [[ -z "$dir" ]]; then
dir=$(git rev-parse --path-format=absolute --git-common-dir 2>/dev/null) || die 2 "not in a git repository, and READY_VERIFY_DIR is unset"
dir=$(git -C "$CHECKOUT" rev-parse --path-format=absolute --git-common-dir 2>/dev/null) || die 2 "$(printf '%q' "$CHECKOUT") is not in a git repository, and READY_VERIFY_DIR is unset"
dir+=/ready-verify
fi
file="$dir/$HEAD_SHA"
Expand Down
Loading
Loading