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

Handle all message filters starting with -- as git-log options #10943

Conversation

gerhardol
Copy link
Member

Similar handling as #10832 for branch box

Proposed changes

#10240 handles "--not ", "--exclude=" as options, this aligns with #10832

To be considered for 4.1

Test methodology

Tests updated.

Merge strategy

I agree that the maintainer squash merge this PR (if the commit message is clear).


✒️ I contribute this code under The Developer Certificate of Origin.

@ghost ghost assigned gerhardol May 4, 2023
Copy link
Member

@mstv mstv left a comment

Choose a reason for hiding this comment

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

Looks sensible, have not run

@@ -1183,10 +1183,10 @@ string GetFilterRefName(string gitRef)

[TestCase("message1", true)]
[TestCase("message1 --not", true)]
[TestCase("--not=message1", true)]
[TestCase("--not=message1", false)]
[TestCase("--not message1", false)]
[TestCase(" --not message1", true)]
Copy link
Member

Choose a reason for hiding this comment

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

Is this intended? Else .TrimLeft().StartsWith("--")?

Copy link
Member Author

Choose a reason for hiding this comment

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

(unchanged from before)
The message to search for is not trimmed, initial and trailing whitespace is searched for.

[TestCase("--not message1", false)]
[TestCase(" --not message1", true)]
[TestCase("--exclude message1", true)]
[TestCase("--exclude message1", false)]
[TestCase("--exclude= message1", false)]
[TestCase("--exclude= message1 ", false)]
[TestCase("\t--exclude= message1", true)]
Copy link
Member

Choose a reason for hiding this comment

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

ditto

@gerhardol gerhardol added this to the 4.1 milestone May 5, 2023
@RussKie RussKie merged commit 9f84f6c into gitextensions:master May 6, 2023
4 checks passed
@ghost ghost modified the milestones: 4.1, vNext May 6, 2023
@RussKie RussKie modified the milestones: vNext, 4.1 May 6, 2023
RussKie pushed a commit that referenced this pull request May 6, 2023
Co-authored-by: Gerhard Olsson <gerhardol@users.noreply.github.com>
(cherry picked from commit 9f84f6c)
@gerhardol gerhardol deleted the feature/i10240-filter-message-options branch May 6, 2023 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants