Skip to content

feat!: check out the reviewed revision so language servers see it - #416

Draft
I-Al-Istannen wants to merge 3 commits into
moritzwilksch:mainfrom
I-Al-Istannen:feat/auto-checkout
Draft

I-Al-Istannen wants to merge 3 commits into
moritzwilksch:mainfrom
I-Al-Istannen:feat/auto-checkout

Conversation

@I-Al-Istannen

Copy link
Copy Markdown
Collaborator

No description provided.

Language servers read the files on disk, so they only answered when the
new side was the worktree or HEAD. Entering a review now checks out its
new side when the worktree is clean: a local branch is switched to, any
other commit (a pull request, a remote branch, a tag, a lone commit) is
checked out detached. A dirty worktree, a refused switch, a range named
after HEAD or with the worktree on either side leaves the checkout alone
and says why. On exit diffle switches back unless HEAD moved since or
the worktree is dirty. --no-checkout (and --no-lsp) turn it off.
A reload recomputed the review but left HEAD where it was, so after a
push to the pull request or a fetch of the remote branch the new side
moved past the checkout and the language servers went quiet. A recompute
now checks out the new side again, as long as HEAD is still where this
run left it.
A checkout rewrites files on disk that no open document covers. When a
snapshot's HEAD differs from the last one, the files between the two
commits go to every server as workspace/didChangeWatchedFiles. The
capability stays unadvertised: rust-analyzer would otherwise stop
watching files itself and expect every edit from diffle.

This branch has not been deployed

No deployments
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