From ad8b9e55a89e9e8c361806cab7c1ac9a03a2fc71 Mon Sep 17 00:00:00 2001 From: bchanot Date: Fri, 9 Oct 2026 09:26:39 +0200 Subject: [PATCH 1/2] =?UTF-8?q?chore(githooks):=20post-commit/post-merge?= =?UTF-8?q?=20fail=20closed=20on=20gitflow.autopush=20=E2=80=94=20unreadab?= =?UTF-8?q?le=20or=20non-boolean=20value=20=3D=20no=20push,=20named=20warn?= =?UTF-8?q?ing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .githooks/post-commit | 11 +++++++++-- .githooks/post-merge | 11 +++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/.githooks/post-commit b/.githooks/post-commit index 417fecf..08d9954 100755 --- a/.githooks/post-commit +++ b/.githooks/post-commit @@ -5,8 +5,15 @@ hook=post-commit # holds. Never fails the commit: no origin / offline / refused → warning only. # Opt out for one command with GITFLOW_NO_PUSH=1 (throwaway repos, tests). [ "${GITFLOW_NO_PUSH:-0}" = 1 ] && exit 0 -# Per-repo opt-out (no push rights on a foreign clone): git config gitflow.autopush false -[ "$(git config --bool --default true gitflow.autopush)" = false ] && exit 0 +# Manual-push mode (human-set): git config gitflow.autopush false. Fail closed: +# an unparseable value or a config read failure also means "no push", named. +# Mirrors gitflow_push_mode (lib/gitflow.sh); arms pinned by T18b/T18h/T18q2/T18q4. +v=$(git config --bool gitflow.autopush 2>/dev/null); rc=$? +case "$rc:$v" in + 0:true|1:*) ;; + 0:false) exit 0 ;; + *) echo "gitflow $hook: gitflow.autopush unreadable (git rc $rc) — NOT pushed, treated as manual push mode; fix the value by hand" >&2; exit 0 ;; +esac git remote get-url origin >/dev/null 2>&1 || exit 0 br=$(git symbolic-ref --short -q HEAD 2>/dev/null) || exit 0 # detached HEAD — nothing to track if command -v timeout >/dev/null 2>&1; then t="timeout ${GITFLOW_PUSH_TIMEOUT:-30}"; else t=""; fi diff --git a/.githooks/post-merge b/.githooks/post-merge index 69a9f65..853eda0 100755 --- a/.githooks/post-merge +++ b/.githooks/post-merge @@ -5,8 +5,15 @@ hook=post-merge # holds. Never fails the commit: no origin / offline / refused → warning only. # Opt out for one command with GITFLOW_NO_PUSH=1 (throwaway repos, tests). [ "${GITFLOW_NO_PUSH:-0}" = 1 ] && exit 0 -# Per-repo opt-out (no push rights on a foreign clone): git config gitflow.autopush false -[ "$(git config --bool --default true gitflow.autopush)" = false ] && exit 0 +# Manual-push mode (human-set): git config gitflow.autopush false. Fail closed: +# an unparseable value or a config read failure also means "no push", named. +# Mirrors gitflow_push_mode (lib/gitflow.sh); arms pinned by T18b/T18h/T18q2/T18q4. +v=$(git config --bool gitflow.autopush 2>/dev/null); rc=$? +case "$rc:$v" in + 0:true|1:*) ;; + 0:false) exit 0 ;; + *) echo "gitflow $hook: gitflow.autopush unreadable (git rc $rc) — NOT pushed, treated as manual push mode; fix the value by hand" >&2; exit 0 ;; +esac git remote get-url origin >/dev/null 2>&1 || exit 0 br=$(git symbolic-ref --short -q HEAD 2>/dev/null) || exit 0 # detached HEAD — nothing to track if command -v timeout >/dev/null 2>&1; then t="timeout ${GITFLOW_PUSH_TIMEOUT:-30}"; else t=""; fi From 059a770139e325d72f4c89270c34454cb2775e26 Mon Sep 17 00:00:00 2001 From: bchanot Date: Fri, 9 Oct 2026 09:26:39 +0200 Subject: [PATCH 2/2] =?UTF-8?q?feat(tmux):=20move=20panes=20between=20wind?= =?UTF-8?q?ows=20=E2=80=94=20J/L=20join=20marked=20pane,=20S=20swap,=20(?= =?UTF-8?q?=20)=20repeatable=20swap-pane=20up/down;=20CHANGELOG=20Unreleas?= =?UTF-8?q?ed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 4 ++++ tmux.conf | 12 ++++++++++++ 2 files changed, 16 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3169859..67e43a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). Versioning: se ### Added - `install.sh` asks the gitflow push mode (`gitflow.autopush`, exactly `true` or `false`, Enter = `true`) and writes it to `~/.gitconfig`; an existing value is reused, `DOTFILES_GITFLOW_AUTOPUSH` presets it, any other preset aborts the install. - `gitconfig`: fixed `core.hooksPath = ~/.claude/githooks`. +- `tmux.conf`: move panes between windows — `J`/`L` join the marked pane below/beside, `S` swaps it with the current one, `(`/`)` (repeatable) move the pane to the previous/next slot. + +### Changed +- `.githooks/post-commit` and `post-merge` fail closed on `gitflow.autopush`: an unreadable or non-boolean value means no push, with a named warning (was: silently treated as `true`). ### Fixed - `~/.gitconfig` was deployed with the literal `@USER@` / `@EMAIL@` placeholders: the installer read the identity from the repo bashrc template instead of the answers. diff --git a/tmux.conf b/tmux.conf index bcda2e9..dad5910 100644 --- a/tmux.conf +++ b/tmux.conf @@ -187,6 +187,18 @@ bind-key l "split-window -h -c '#{pane_current_path}'" bind-key i "split-window -h -c '#{pane_current_path}'" # i: side by side (vertical bar) bind-key - "split-window -v -c '#{pane_current_path}'" # -: stacked (horizontal bar) +# Move panes between windows and around. Source = the marked pane (prefix m, +# toggles) when one is set, else the current pane. Prefix ! (stock break-pane) +# does the reverse: current pane out to a new window. +bind-key J join-pane -v # marked pane joins this window, below (mirrors j) +bind-key L join-pane -h # marked pane joins this window, beside (mirrors l) +bind-key S swap-pane # swap marked pane with the current one +# Stock { } (swap-pane -U/-D) sit behind alt+( alt+) on a Mac AZERTY keyboard. +# ( ) are unshifted there, and repeatable; they replace switch-client -p/-n, +# which prefix s (choose-tree) still covers. +bind-key -r ( swap-pane -U # move pane up / left (previous slot) +bind-key -r ) swap-pane -D # move pane down / right (next slot) + bind q kill-window # Kill window bind Q kill-session # Kill the session (not server) bind C-c neww \; set status on # enable status bar