feature: add fulltext commit search across SHA/author/committer/message (implements #985) - #2543
feature: add fulltext commit search across SHA/author/committer/message (implements #985)#2543mdindoffer wants to merge 1 commit into
Conversation
…ge (sourcegit-scm#985) Git cannot OR --grep/--author/--committer in a single invocation, so the new `All` method (now the default) runs the field queries separately, plus an exact-SHA lookup, and merges the deduplicated results sorted by commit time. Adds an internal-only `ByCommitter` query mode to power it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
9e2c50e to
9194736
Compare
|
@love-linger Are you accepting pull requests? I tested this manually on my local build, I did not find any issues. What do you think about calling this option "All" if it does not include the path/content search? Should I rename it to something like "Metadata" instead? |
|
Sorry for the delayed reply. I do not think we need this feature.
|
|
Could you please elaborate on why do you think this is "unhelpful"? I would argue this is a very nice usability improvement, for the justification see the original issue #985 . When you are searching for multiple "things" in succession you would have to always pick and select the appropriate item from the dropdown, now you finally have a fulltext search where you can copy&paste the commit SHA and the author email and so on. The performance is OK, I tested this on a repository with thousands of commits, it was instantaneous. Saving 2-3 mouse clicks per user interaction is a usability design win. When you look for UX best practices for implementing search functionality, they always mention a unified index is a cornerstone: |
|
I think I have explained it very clearly - it will take too long time. For example: with your PR, seaching a simple string |
Summary
This PR adds a "fulltext" search capability to perform a unified search across multiple commit fields at once, which was refused a year ago in #985 due to time constraints.
How & why
Git has no bult-in logical "OR"
--grep/--author/--committerin a single invocation, so the newAllmethod (now the default) runs the field queries separately, plus an exact-SHA lookup, and merges the deduplicated results sorted by commit time. Adds an internal-onlyByCommitterquery mode to power it.Disclaimer
This was done with the help of Claude, as I have not done any C# development in the last 8 years. Feel free to reject on maintainability concerns.