From e588a17be50eb5abb5cdbb814cdb2f092ed97eed Mon Sep 17 00:00:00 2001 From: Tommy Healy Date: Mon, 13 Jul 2026 13:02:44 +0200 Subject: [PATCH] Point branch_data_mode 'none' at omission in error message The test expecting this hint was added in bdc22b8 but the code still fell through to the generic invalid-value error. Co-Authored-By: Claude Fable 5 --- src/cli/config.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/cli/config.ts b/src/cli/config.ts index 9a81c3b..d90c3c3 100644 --- a/src/cli/config.ts +++ b/src/cli/config.ts @@ -215,6 +215,11 @@ function resolveBranchDataMode(raw: Record): { mode: BranchData if (typeof value !== "string") throw new Error("branch_data_mode must be a string."); const mode = value.trim().toLowerCase(); if (!mode) return { mode: null, explicit: false }; + if (mode === "none") { + throw new Error( + "Invalid branch_data_mode 'none'. Omit branch_data_mode to create branches without data (the default)." + ); + } if (!BRANCH_DATA_MODE_VALUES.includes(mode as BranchDataMode)) { throw new Error( `Invalid branch_data_mode '${value}'. Allowed values are: ${BRANCH_DATA_MODE_VALUES.join(", ")}.`