From 361c5958e3d3e31541163ae725f446e09f39a109 Mon Sep 17 00:00:00 2001 From: Rudy Date: Wed, 4 Nov 2026 14:45:08 +0100 Subject: [PATCH] fix: post-merge hook waits at most 20 seconds by default (was 60) --- internal/initrepo/initrepo.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/initrepo/initrepo.go b/internal/initrepo/initrepo.go index 39b49aa..0d752fc 100644 --- a/internal/initrepo/initrepo.go +++ b/internal/initrepo/initrepo.go @@ -134,12 +134,13 @@ exit 0 // PostMergeHook runs the housekeeping after a pull or merge: it closes the tasks that merged commits say // they close and deletes fully merged local branches (see "relai tidy"). It does nothing without relai or -// bd, is limited in time, and never fails the pull. +// bd, is limited in time (RELAI_HOOK_TIMEOUT seconds, default 20: a pull never waits longer, and what it +// did not finish the next run does), and never fails the pull. const PostMergeHook = `#!/bin/sh # relai: housekeeping after a merge or pull ("relai tidy --apply"). Installed by "relai init --hooks". # Never fails the merge: any problem here is ignored. command -v relai >/dev/null 2>&1 || exit 0 -limit=${RELAI_HOOK_TIMEOUT:-60} +limit=${RELAI_HOOK_TIMEOUT:-20} if command -v timeout >/dev/null 2>&1; then timeout "$limit" relai tidy --apply --quiet || true else