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

Fix commit search in all branches #11849

Merged
merged 3 commits into from
Jun 11, 2020
Merged

Conversation

CirnoT
Copy link
Contributor

@CirnoT CirnoT commented Jun 10, 2020

We perform two commands on commit search, --all should not be used without --grep.

Fixes case where searching for commit with 'All Branches' selected would always return newest commit from newest ref instead of correct commit.

@lafriks
Copy link
Member

lafriks commented Jun 10, 2020

If I understand correctly it will just change only argument order but does not really changes --all should not be used without --grep

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jun 10, 2020
@lafriks lafriks modified the milestones: 1.12.0, 1.13.0 Jun 10, 2020
@CirnoT
Copy link
Contributor Author

CirnoT commented Jun 10, 2020

Expand diff below, the same args are used for two commands - this PR makes it so that --all is used only for first command.

@CirnoT
Copy link
Contributor Author

CirnoT commented Jun 10, 2020

hashCmd vs cmd

@zeripath
Copy link
Contributor

OK I think that code needs comments as to what the hell it is doing. It's really not clear!

(Not your fault but as you've spent the time to understand this - you may be best placed to expand the commentary and make this clearer.)

@CirnoT
Copy link
Contributor Author

CirnoT commented Jun 11, 2020

Added comments; pretty detailed ones too.

@CirnoT
Copy link
Contributor Author

CirnoT commented Jun 11, 2020

Hopefully now you see that --all breaks logic of hashCmd

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jun 11, 2020
Copy link
Member

@techknowlogick techknowlogick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙏 ty for this PR!

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jun 11, 2020
@techknowlogick
Copy link
Member

ping LG-TM

@techknowlogick techknowlogick merged commit 5a26192 into go-gitea:master Jun 11, 2020
@CirnoT CirnoT deleted the search-all branch June 11, 2020 22:08
ydelafollye pushed a commit to ydelafollye/gitea that referenced this pull request Jul 31, 2020
* Fix commit search in all branches

* comments

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
@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
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants