-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Add checkbox to search for all the branches by commit message #813
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's working, but need few changes.
options/locale/locale_en-US.ini
Outdated
@@ -513,6 +513,7 @@ editor.upload_files_to_dir = Upload files to '%s' | |||
|
|||
commits.commits = Commits | |||
commits.search = Search commits | |||
commits.searchAll = All |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use snake_case:
searchAll
-> search_all
func (c *Commit) SearchCommits(keyword string) (*list.List, error) { | ||
return c.repo.searchCommits(c.ID, keyword) | ||
func (c *Commit) SearchCommits(keyword string, all bool) (*list.List, error) { | ||
return c.repo.searchCommits(c.ID, keyword, all) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should not change this package directly in the vendor folder.
You should send PR to https://github.com/go-gitea/git first, and after aproved use govendor to update the changes here.
templates/repo/commits_table.tmpl
Outdated
@@ -6,6 +6,7 @@ | |||
<div class="ui tiny search input"> | |||
<input name="q" placeholder="{{.i18n.Tr "repo.commits.search"}}" value="{{.Keyword}}" autofocus> | |||
</div> | |||
<input type="checkbox" name="all" id="all" value="true" {{.All}}><label for="all">{{.i18n.Tr "repo.commits.searchAll"}}</label> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, too:
searchAll
-> search_all
and updating the vendor directory
Hope, I've done it correctly, I've never used go before :) |
LGTM |
@andreynering please confirm. |
@andreynering then change this to v1.1 or wait to v1.2? |
@lunny I think this change is simple enough and can be merged now. |
LGTM |
This patch adds the ability to search for all the commits containing the entered text in their commit message, not only in the current branch