Add projectile-find-changed-file - #2134
Merged
Merged
Conversation
Jumping to something you've been editing meant completing over the whole project and remembering the name. Git already knows the shorter list. Without a prefix it's the working tree - staged, unstaged, untracked; with one you pick a revision and get everything that differs from it, which is the list you want when picking a branch back up. Two things needed care. Git reports porcelain and diff paths relative to the repository root no matter where it ran, so a project below that root gets them translated and anything outside it dropped. And a rename occupies two NUL-separated fields, so the source path has to be consumed in step or it reads as another changed file. The dashboard's git runner moves out of the dashboard to be shared; it was already shell-free and careful not to take the index lock.
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.
Jumping to a file you've been editing meant completing over every file in the
project. Git already knows the much shorter list, so
s-p Ccompletes overthat instead: staged, unstaged and untracked.
With a prefix argument it asks for a revision - completing over the project's
branches - and the candidates become everything that differs from it, plus
whatever isn't tracked yet. That's the "what did this branch touch" list.
Two things needed care, and both have specs against real git repositories
rather than canned output:
regardless of where it ran. A project sitting below that root would have got
paths that don't resolve, so they're translated and anything outside the
project is dropped.
one. Consuming them in step keeps the source path from reading as another
changed file.
--untracked-files=allrather than the dashboard'snormal, since here theindividual files under a new directory are the point.
The dashboard's git runner moves out of the dashboard so both can use it. It
was already shell-free and passing
--no-optional-locks, so nothing about ithad to change.
One incidental fix: my first version of these specs wrote plain text into
.elfiles in
test/sandbox/, which eldev then tries to load as test files on thenext run - the suite passed once and then failed. They write valid elisp now.