Search commit via commit SHA(short or full) #3551

Closed
opened 2025-11-02 05:16:50 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @lunny on GitHub (Jul 9, 2019).

Currently it will always search in commit message.

Originally created by @lunny on GitHub (Jul 9, 2019). Currently it will always search in commit message.
GiteaMirror added the type/proposaltype/enhancement labels 2025-11-02 05:16:50 -06:00
Author
Owner

@gary-kim commented on GitHub (Jul 9, 2019):

Could I try working on this?

@gary-kim commented on GitHub (Jul 9, 2019): Could I try working on this?
Author
Owner

@lunny commented on GitHub (Jul 9, 2019):

@gary-kim Yes, please. Nobody others are working on this.

@lunny commented on GitHub (Jul 9, 2019): @gary-kim Yes, please. Nobody others are working on this.
Author
Owner

@gary-kim commented on GitHub (Jul 9, 2019):

@lunny There doesn't seem to be a built in way in git to search via commit hashes. It should possible to get the full list then find matching commits and add it to the list but that won't exactly be an efficient process. Does that sound okay?
The idea would be to run git log without --grep then regex through for any commits that match the keywords and add matching commits to the list as well.

@gary-kim commented on GitHub (Jul 9, 2019): @lunny There doesn't seem to be a built in way in git to search via commit hashes. It should possible to get the full list then find matching commits and add it to the list but that won't exactly be an efficient process. Does that sound okay? The idea would be to run `git log` without `--grep` then regex through for any commits that match the keywords and add matching commits to the list as well.
Author
Owner

@lunny commented on GitHub (Jul 9, 2019):

I think we can just use https://github.com/go-gitea/gitea/blob/master/modules/git/repo_commit.go#L121 to do that maybe.

@lunny commented on GitHub (Jul 9, 2019): I think we can just use https://github.com/go-gitea/gitea/blob/master/modules/git/repo_commit.go#L121 to do that maybe.
Author
Owner

@gary-kim commented on GitHub (Jul 9, 2019):

I already have it made, it's just that its inefficient. I'll open a pull request after testing.

@gary-kim commented on GitHub (Jul 9, 2019): I already have it made, it's just that its inefficient. I'll open a pull request after testing.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#3551