diff --git a/commit-branch.sh b/commit-branch.sh index 03aebe7..c9235e6 100755 --- a/commit-branch.sh +++ b/commit-branch.sh @@ -47,10 +47,9 @@ cd "$WORKDIR" # createCommitOnBranch commits onto a branch that already exists; it cannot # create one, because a branch needs a commit and this is how commits are made. -# The old git-push path bootstrapped a missing branch with `git init`, and that -# is the one thing lost here. Both state branches have existed since the -# archive did, so this fires only if one is deleted -- in which case the fix is -# to recreate it deliberately, not to have a workflow guess at its contents. +# Bootstrapping a missing branch is deliberately not done here: this fires only +# if a state branch is deleted, and the fix then is to recreate it deliberately +# rather than have a workflow guess at its contents. if ! git rev-parse --git-dir >/dev/null 2>&1; then log "FATAL: $WORKDIR is not a checkout of $BRANCH." log " The branch has to exist before anything can be committed to it." diff --git a/tests/run.sh b/tests/run.sh index 07682c1..d010099 100755 --- a/tests/run.sh +++ b/tests/run.sh @@ -151,10 +151,10 @@ echo "an HTTP failure reports what GitHub said, not just curl's exit code" git -c user.name=t -c user.email=t@example.invalid commit -qm base printf 'two\n' > keep.txt - # curl as --fail-with-body behaves on an HTTP error: the body is written - # to the output AND the exit status is non-zero. That combination is what - # used to lose the message -- set -e took the exit before anything printed - # the body, and the trap then deleted the file. + # curl as --fail-with-body behaves on an HTTP error: the body is written to + # the output AND the exit status is non-zero. That combination loses the + # message unless it is handled -- set -e takes the exit before anything + # prints the body, and the trap then deletes the file. mkdir -p "$work/bin" cat > "$work/bin/curl" <<'FAKE' #!/bin/sh