Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
lunny opened this issue Jul 9, 2019 · 5 comments · Fixed by #7400
Closed

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

lunny opened this issue Jul 9, 2019 · 5 comments · Fixed by #7400
Labels
type/enhancement An improvement of existing functionality type/proposal The new feature has not been accepted yet but needs to be discussed first.
Milestone

Comments

@lunny
Copy link
Member

lunny commented Jul 9, 2019

Currently it will always search in commit message.

@lunny lunny added the type/proposal The new feature has not been accepted yet but needs to be discussed first. label Jul 9, 2019
@gary-kim
Copy link
Member

gary-kim commented Jul 9, 2019

Could I try working on this?

@lunny
Copy link
Member Author

lunny commented Jul 9, 2019

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

@gary-kim
Copy link
Member

gary-kim commented 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.

@lunny
Copy link
Member Author

lunny commented 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.

@gary-kim
Copy link
Member

gary-kim commented Jul 9, 2019

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

@lunny lunny added this to the 1.10.0 milestone Sep 3, 2019
@lunny lunny added the type/enhancement An improvement of existing functionality label Sep 3, 2019
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/enhancement An improvement of existing functionality type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants