refactor: move hunk actionability decoration out of list building #148
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
barrettruth/diffs.nvim#148
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Tracked By
Context
Generated buffers and review lists attach mutation semantics to parsed hunks so maps like
dpanddocan make the right staged/unstaged decision. That policy is currently partly owned by list construction.Problem
lua/diffs/lists.luamutates parsed hunks with fields such as:diff_speccan_putcan_obtainactionablemutation_targetActual mutation semantics live in
lua/diffs/actions.luaandlua/diffs/behavior.lua. The list module should project hunks into quickfix/loclist items, not own mutation policy.Scope
Add a small actionability helper, likely in
diffs.actionsordiffs.hunks, that decorates hunks from aDiffSpec. Letlists.luacall that helper or receive pre-decorated hunks.Acceptance Criteria
dpanddobehavior is unchangeduser_data.diffsstays compatiblelists.luano longer computescan_put/can_obtaindirectlySuggested Readiness