agent-exec transport 5faf257d5e2b698a220fe3ecfb2948b0/32c83177850b

This commit is contained in:
agent-exec-transport
2026-10-20 11:50:46 +00:00
parent 8a8f9f57a5
commit d755fa0f6d
2 changed files with 22 additions and 1 deletions
+2 -1
View File
@@ -1131,7 +1131,8 @@ cmd_finish() {
# registered-root, owner, lock, recursive dirt and ignored-file checks have passed.
check_worktree finish
local -a removal=(worktree remove)
if git ls-files --stage | grep -q '^160000 '; then
# Read the whole listing: an early-exit reader SIGPIPEs git on large indexes and pipefail drops --force.
if git ls-files --stage | awk '$1 == "160000" { found = 1 } END { exit !found }'; then
removal+=(--force)
fi
if ! git -C "$mainrepo" "${removal[@]}" "$root"; then