mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-12 16:46:25 -04:00
The focused main view's discard command (coming next) needs to read either side's diff and apply a patch with an arbitrary direction and target: discard from the working tree reads the unstaged diff but applies a reverse patch that is not cached. stageDiffLines couldn't express that — it used a single reverse flag both to pick which diff to read and to reverse the apply, and hardcoded Cached: true. The read side and the apply direction are independent (they coincide only for staging and unstaging), so split them: applyDiffLines now takes sourceCached (which diff to read) and a git_commands.ApplyPatchOpts (how to apply). Renamed from stageDiffLines since it now covers stage, unstage, and discard. Staging passes the same values as before, preserving behavior. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| app | ||
| cheatsheet | ||
| commands | ||
| common | ||
| config | ||
| constants | ||
| env | ||
| fakes | ||
| gocui | ||
| gui | ||
| i18n | ||
| integration | ||
| jsonschema | ||
| logs | ||
| snake | ||
| tasks | ||
| theme | ||
| updates | ||
| utils | ||