Replies: 1 comment
-
that's a great idea i hope you find the solution for it i am new to the telescope so i can't help you but that's pretty interesting i think it's going to be possible but it will need some really hard core work because the project could be very big and searching through it's commits it will effect the telescope performance |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I have an interesting use case:
often I want to find occurrences of a term within a project, but only those that have been introduced by a given commit, or between two specific commits. (e.g. when a PR was merged that introduces the usage or behavior of a certain method or object that was already liberally used before the PR, but the PR also contains irrelevant things)
A second use case, which is a more specialized form of the above, is looking for a term but only when the lines with said term are not committed yet. For example, when I'm working in a software project and making changes, i will often add "TODO" mentions, and these might be part of staged hunks or still be dirty. But as i work on the PR i want to go over all my TODO entries, but not those that pre-existed.
The way I'm thinking about solving this, is maybe first selecting a "from" and a "to".
these could be commits, branches, the working copy, or index (what's staged).
I suppose we could then either do a normal term search and do some blame based filtering, or do a git diff, search within that, and map the lines in the diff back to the real location within the files. (but this could be tricky, e.g. when changes are staged but undone in the real file)
Can this be done already (and if so, how?), or am i overthinking something?
Curious to hear your thoughts...
thanks,
Dieter
Beta Was this translation helpful? Give feedback.
All reactions