-
Notifications
You must be signed in to change notification settings - Fork 96
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
HeaderMatchingFilter: do not convert user supplied tags #315
Conversation
Codecov Report
@@ Coverage Diff @@
## master #315 +/- ##
==========================================
- Coverage 47.08% 47.03% -0.05%
==========================================
Files 30 30
Lines 1079 1080 +1
==========================================
Hits 508 508
- Misses 571 572 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
fe71b20 ("lowercase generated tag names", 2014-02-18) made the HeaderMatchingFilter convert tags to lower case. While this may make sense for tags which are generated from header values it certainly does not for tags which the user specified verbatim in their config. So, only convert the values resulting from a pattern match.
f0412fe
to
9290682
Compare
Hey @mjg , I am not sure that many people use non lowercased tags, If we can find that use case in notmuch, we could add this but it would also require a test. |
First of all, tags are case sensitive and mixed and uppercase tags are allowed. So there is no reason to change the case of tags automatically, and every reason to keep it as is. Rightly, afew does not change the case of tags anywhere else, except in this filter. Now, for tags created automatically from a header value, it can make sense to normalize it to lower case (though one might still argue about it). This is what the original commit intended and what my patch does not change at all. But the original commit also converted every tag that the user specified verbatim in their config, and that is what I change. Say, you have:
then afew really has no business changing the case of the tag which the user specified verbatim. |
I aggree with that, and the patch is small let's merge it. |
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.
LGTM
fe71b20 ("lowercase generated tag names", 2014-02-18) made the
HeaderMatchingFilter convert tags to lower case. While this may make
sense for tags which are generated from header values it certainly does
not for tags which the user specified verbatim in their config.
So, only convert the values resulting from a pattern match.