Skip to content

Allow fulltext search across all fields (SHA hash, title, author name...) #985

Closed

Description

@mdindoffer

What

Currently Sourcegit can search for commits in various fields: commit SHA hash, commit message, author, etc. But each of these search fields (or "categories") must be selected individually before initiating the search.

Image

I would like Sourcegit to have an option to perform a "fulltext" search that performs the search on all of the fields at the same time.

Why

I often switch the fields I search by. Sometimes I want to search by "Author" to look for commits made by a colleague, other times I want to search for a specific term in all commit messages. Each time I want to search for something else I have to select the corresponding field in the dropdown, which is unnecessary and a little bit annoying. If the search would automatically search all of the fields I would not have to change the settings back and forth all the time.

Activity

  1. love-linger commented on Mar 6, 2025

    @love-linger
    Collaborator

    The GIT commands used behind these 5 ways are completely different, and I haven't found any that support the OR operation.

    • SHA: git show --no-show-signature --decorate=full --pretty=format:%H%n%P%n%D%n%aN±%aE%n%at%n%cN±%cE%n%ct%n%s -s <commit_hash>
    • Author: git log -1000 --date-order --no-show-signature --decorate=full --pretty=format:%H%n%P%n%D%n%aN±%aE%n%at%n%cN±%cE%n%ct%n%s -i --author=<author>
    • Committer: git log -1000 --date-order --no-show-signature --decorate=full --pretty=format:%H%n%P%n%D%n%aN±%aE%n%at%n%cN±%cE%n%ct%n%s -i --committer=<committer>
    • File: git log -1000 --date-order --no-show-signature --decorate=full --pretty=format:%H%n%P%n%D%n%aN±%aE%n%at%n%cN±%cE%n%ct%n%s -- <pathspec>
    • Messsage: a litte bit complex. First input string will be split into words, and joined with --grep="<escaped_word>" format, and then use git log -1000 --date-order --no-show-signature --decorate=full --pretty=format:%H%n%P%n%D%n%aN±%aE%n%at%n%cN±%cE%n%ct%n%s --all-match -i <joined_string>
  2. self-assigned this
    on Mar 6, 2025
  3. mdindoffer commented on Mar 6, 2025

    @mdindoffer
    Author

    Well, if git does not support this out of the box, you can always just perform individual searches and then merge the results.

  4. love-linger commented on Mar 10, 2025

    @love-linger
    Collaborator

    Well, if git does not support this out of the box, you can always just perform individual searches and then merge the results.

    It will take too much time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

not-plannedIt's not planned in the future

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions