Repository navigation
Conversation
- default start-point cwd: branch checked out in worktree add runs in; hub root / outside worktrees -> local default branch - detached HEAD -> its commit, like git switch -c; no base recorded - keywords for --from / GIT_HOP_ADD_FROM / hop.add.defaultStartPoint: cwd, default-branch (now local ref; origin/<default> only when no local branch), origin-default (old behaviour), initial - default branch name falls back to origin/HEAD when hop.json has none - dry-run: resolved start-point + setting that picked it - copy-ignored source: worktree start-point came from - auto fetch only when resolved start-point is an origin ref - help text, docs, help golden; resolveStartPoint comment corrected BREAKING CHANGE: add without --from no longer starts new branches from a freshly fetched origin/<default>, nor sets it as their upstream; inside a worktree it starts from that worktree's branch, at the hub root from the local default branch. `git config hop.add.defaultStartPoint origin-default` restores the old behaviour.
- after copy-ignored, before env set-up + post-worktree-add hooks - auto: mise on PATH, new worktree has mise config, source worktree's trusted (mise trust --show), config files identical byte for byte (file list via mise's paranoid-mode trust --show, no parsing) - otherwise skip with hint: mise missing, no config, untrusted source, config differs, no source worktree - trust via mise trust <worktree> - hop.add.miseTrust auto|always|never (default auto); --mise-trust = always, --no-mise-trust = never for one run - dry-run reports source-side decision - source worktree shared with copy-ignored (forkSource) - help text, help golden, docs (commands, configuration, reference, hooks)
- mise not on PATH: debug line only, no hint (add + dry-run) - no mise config in new worktree: debug only - dry-run: debug only when no source worktree or source has no mise config - hint kept for actionable skips (mise present, config present, source untrusted / config differs / no source), with mise trust <worktree> command on its own hint line - tests: missing mise + no config assert silence; preview unit tests - help text, help golden, docs: mise optional
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
git hop addwithout--fromnow starts from the branch of the worktree it runs in (or the local default branch at the hub root), and trusts the new worktree's mise config when the source worktree's is trusted. mise stays optional: nothing is printed when it is absent or unused.Changes
Default start-point (
feat(add)!)Before: no
--frommeantrefs/remotes/origin/<default>, always fetched first, set as upstream, regardless of the worktree you were in.Now, with no
--from:hop.jsonrepo.defaultBranch, else origin/HEAD's name);origin/<default>only when no local branch existsgit switch -c), no base recordedConfigured through the existing
hop.add.defaultStartPointkey,GIT_HOP_ADD_FROM, or--from:cwd(new default)default-branchorigin-defaultorigin/<default>(previous behaviour)initial/ any ref--dry-runprints the resolved start-point and the reasonresolveStartPointcommentmise trust (
feat(add),fix(add))mise's own cross-worktree trust sharing looks for the main checkout, which in a bare hub is the bare repo, so new worktrees with a mise config start untrusted and mise-backed hooks and make targets fail.
New step after ignored files are copied, before environment set-up and
post-worktree-addhooks. Inautomode it runsmise trust <worktree>only when:mise trust --show)Settings:
hop.add.miseTrust auto|always|never(defaultauto),--mise-trust/--no-mise-trustper run.alwaystrusts whenever the new worktree has mise config.Output: silent when mise is not installed or the worktree has no mise config (debug line with
-V). A hint with the manualmise trust <worktree>command appears only when mise and config are present but trust was skipped.mise.<env>.tomlfiles are compared only whenMISE_ENVis set.Breaking change
New branches no longer start from a freshly fetched
origin/<default>and no longer get it as upstream. Restore with:Testing
--from, env over config, detached HEAD, dry-run output) fail before the change and again when it is revertedorigin-defaultexplicitlyMISE_DATA_DIR/MISE_STATE_DIR/MISE_CONFIG_DIR/MISE_CACHE_DIRcovering trusted and untrusted source, differing and extra config, no config, mise missing (silent),always/never, flags; each behaviour re-broken to confirm the tests failgo test ./..., gofmt, go vet, staticcheck cleanDocs:
docs/04-commands.mdx,docs/configuration.md,docs/09-reference.mdx,docs/hooks.md,add --helpreference.