Skip to content

Improved repo renaming and worktree moving - #122

Merged
nnutter merged 12 commits into
masterfrom
timber
Nov 17, 2026
Merged

nnutter merged 12 commits into
masterfrom
timber

Conversation

@nnutter

@nnutter nnutter commented Nov 17, 2026

Copy link
Copy Markdown
Owner

No description provided.

A linked worktree whose checkout lives inside the bare Git directory
moves with that directory when the repository is renamed, but the
repair list still named the old path. `git worktree repair` then failed
on the missing path, and the rename rolled back.

Derive the destination path for such worktrees so repair and
verification address the moved checkout.

Change-Id: I10ec278c1582c7960d4d485e7a80d029b73cd179
A failed rename left the destination directory tree it had created
(e.g. ~/worktrees/spor) behind after restoring the source repository,
which made the rollback look like a partial move.

Prune the empty destination parents while rolling back so a failed
rename leaves no artifacts.

Change-Id: I50f57323c9764c229eac766143ab609c4945f7f9
Owner stripping needs the same notion of a GitHub host that alias
derivation already encodes. Share one predicate so both agree on
github.com and ssh.github.com.

Change-Id: I92ae44a5f00d615e3a81d44723abe4f2930d92f7
`repo add` and `repo import` are about to read settings, but they
should not create a configuration file as a side effect. Extract
ensureConfigFile so a read-only load can treat a missing file as
default settings.

Change-Id: Ic95a21cd06d2a0f0f02f55e2694363db340c9720
The config command is about to gain a repeatable owner flag, and its
RunE already sits at the complexity limit. Extract the boolean flag
handling so the new flag can be added without exceeding it.

Change-Id: I5118b00d4aea2f17729ab04301a6b4026e883599
`repo add` and `repo import` keep the owner in a repository name so
GitHub groupings stay visible, but a personal repository then nests
under an extra directory. Let `timber config --strip-github-owner`
name the owners whose repositories register under the short name.

The list is stored as `strip_github_owners` and matched
case-insensitively because GitHub logins are. Only github.com and
ssh.github.com remotes are affected, an explicit `--name` still wins,
and other hosts keep their full grouping.

Change-Id: Idf58081fbd0eb33b1b2fff6c3c2146ebea323457
The config subcommands that only read a setting, and their shell
completion, must not create the configuration file. Export the
read-only loader so the CLI can load settings without that side effect.

Change-Id: I72bd8cd2738e4ed3024bafc7d64cf72c476604c4
The config subcommands need one place that knows which settings a user
may change, how each value is typed, and how list values normalize.
Describe each setting once so get, set, append, remove, and shell
completion share it.

The keys that record a setup-prompt answer stay internal; setting or
removing a prompted setting updates its decided key.

Change-Id: I17d173b65943b8ca9b56eac57dbf4da89194e266
`timber config` grew a flag for every setting and a matching no- flag
to clear it. That does not extend to list settings and hides the key
names from completion. Replace the flags with show, get, set, append,
and remove subcommands that name settings directly and complete them.

remove resets a setting to its default or drops matching list values,
and the setup prompts now point at `timber config set ...`.

Change-Id: I458b1f90284fedf7d769bbeff7cd7b6d093af7a0
The README and the Timber skill still teach the removed flags, so a
reader would run commands that no longer exist. Describe the
subcommands and point the strip-owner examples at append and remove.

Change-Id: Iff5d7f1f22bacad80848e8479f4cf36840cb3aa7
Keep offering unselected list values after the first removal argument.
Use the setting removal rules so owner matching remains case-insensitive.

Change-Id: I277923c154a6ce93e0c1e0f3c9653aa1cde2f827
Report current directories moved implicitly with the bare repository
through the existing shell path-file mechanism, so t can follow them.

Change-Id: I1b8a7403428ebc33681a780fd22d73d72eecea9b
@nnutter
nnutter merged commit 6a86013 into master Nov 17, 2026
3 checks passed
@nnutter
nnutter deleted the timber branch November 17, 2026 21:18
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