Skip to content

repos: name a branch by release month with branch_pattern - #400

Merged
trick77 merged 1 commit into
masterfrom
worktree-branch-pattern
Nov 22, 2026
Merged

trick77 merged 1 commit into
masterfrom
worktree-branch-pattern

Conversation

@trick77

@trick77 trick77 commented Nov 22, 2026

Copy link
Copy Markdown
Owner

A repository that cuts one release branch per month needed its branch: edited by hand every month.

branch_pattern ({yyyy}|{yy}, {mm}, optional {n}) lets the poller pick the branch after every fetch: the newest matching month not after the target month. The target is the current month from branch_switch_day (1..28, default 1) on, the previous month before it.

  • A month change is an ordinary incremental branch change. The new name is written to repo_state only once its index stands, so citations never name a branch the chunks did not come from.
  • No match is last_error and the index stays; never the default branch.
  • An older month than the target is logged once per month and entry.
  • Refused at load: with branch or snapshot, a pattern without year or month, a switch day without a pattern or outside 1..28.

No schema change, no re-index.

A repository that cuts one release branch per month (rel/2026-11.1)
had to have its branch: edited every month. branch_pattern with
{yyyy}|{yy}, {mm} and {n} lets the poller pick, after every fetch, the
newest matching branch of the rolled-out month: the current one from
branch_switch_day (1..28) on, the previous one before it. A month
change is an ordinary incremental branch change. No match is recorded
as last_error and the index stays; it never falls back to the default
branch. Validated at load; the pattern reaches the poller from the
file, like the index rules, so repo_state is unchanged.
@trick77
trick77 merged commit 9596fa9 into master Nov 22, 2026
1 check passed
@trick77
trick77 deleted the worktree-branch-pattern branch November 22, 2026 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant