-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Support search operators for commits search #6479
Support search operators for commits search #6479
Conversation
Codecov Report
@@ Coverage Diff @@
## master #6479 +/- ##
==========================================
+ Coverage 40.35% 40.48% +0.12%
==========================================
Files 405 405
Lines 54277 54320 +43
==========================================
+ Hits 21904 21989 +85
+ Misses 29356 29312 -44
- Partials 3017 3019 +2
Continue to review full report at Codecov.
|
@typeless could you add some tests? |
3059b38
to
b346859
Compare
The test does not work yet. |
a722086
to
a354319
Compare
Added some basic tests. |
b15121a
to
d8e9be0
Compare
All tests passed. It is ready for review. |
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.
Recommend making an options struct at the git module level. Otherwise lgtm
For now, support auther: committer: When more than one prefix is supplied is presented, the result is the union. When different prefixes are supplied, the result is the intersection. For example, "author:alice author:bob" => the result is all commits authored by Alice OR Bob "hello committer:alice" => the result is all commits committed by Alice AND has the keyword 'hello' in the message. Note that there should NOT have any space after the colon(:) of the prefix. For example, "author:bill" => correct "author: bill" => wrong
I have no idea about how to format it with line breaks.
e64e61d
to
c8753e1
Compare
Hold on, I accidentally |
Fixed. |
@typeless thanks for your PR. My comment is not a block that could be another PR. |
@lunny okay, thanks. |
For now, support auther:, committer:, after: and before:,
When more than one prefix is supplied, the result is the union.
When different prefixes are supplied, the result is the intersection.
For example,
"author:alice author:bob"
=> the result is all commits authored by Alice OR Bob
"hello committer:alice after:2019-03-05 before:2019-03-10"
=> the result is all commits committed by Alice AND has the keyword during 2019-03-05~2019-03-10.
'hello' in the message.
Essentially, this is a wrapper for
git log
with the support of--grep
,--author
,--committer
,--after
, and--before
options.Note that there should NOT have any space after the colon(:) of the prefix.
For example,
"author:bill" => correct
"author: bill" => wrong