T1: Hoist ignore/unignore marking internals into verb-agnostic shared impls#321
Merged
philcunliffe merged 1 commit intoJul 17, 2026
Merged
Conversation
Extract runMarkMachineLocal, runUnmarkMachineLocal, and runIgnoreCheck in src/core/commands/clients.js so they take an explicit resolved targetDir instead of computing it from parsed argv, and add repoRootDefaultTarget as the one shared repo-root-default placement rule. This is a pure refactor with zero behavior change: the flag branches in runIgnore/runUnignore now resolve the target and delegate, but stdout/stderr/exit codes are unchanged, so all existing ignore/unignore tests pass unmodified. This sets up both the flag forms and the future hyp policy runners (LLP 0112 T2) to call one implementation instead of drifting. Carries the existing @ref LLP 0103#cli annotations along with the moved code; gloss updates come in T6. Task-Id: T1
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.
Implements task T1 of hyp-policy-verb (LLP 0112).
Hoists
runMarkMachineLocal,runUnmarkMachineLocal, andrunIgnoreCheckinsrc/core/commands/clients.jsout of the--private/--local-only/--sync/--checkflag branches into verb-agnostic shared implementations that takean explicit resolved
targetDir(via a new sharedrepoRootDefaultTargetplacement rule), a
class, and the output writer (ctx), instead ofcomputing the target from parsed argv internally.
Pure refactor, zero behavior change:
runIgnore/runUnignoreresolve thetarget the same way as before and delegate; stdout/stderr/exit codes are
unchanged. All existing ignore/unignore tests pass unmodified. Carries the
existing
@ref LLP 0103#cliannotations along with the moved code; glossupdates land in T6 per the plan.
Task-Id: T1