We have a dozen users who has (...) in their 'real name', like 'Jimmy (He) Zhang', and it's causing the diffusion file browser problems when blame is enabled. The parser does not expect those parenthesis and the lines of code will be empty if they were last touched by a user like that.
Details
Details
- Reviewers
wez epriestley lifeihuang JoelB - Group Reviewers
Blessed Reviewers - Commits
- Restricted Diffusion Commit
rP81d9935efe92: Allow parenthesis in author name
Try it
Diff Detail
Diff Detail
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
Comment Actions
I think this will incorrectly match too much for inputs like this (where the line of source code looks like a blame line, as some of the lines in this file do):
abcd (first (middle) last 2010-12-03 1) code(); "(string literal 9999-99-99 2)"; more_code();
Specifically, I think the user's name will be parsed as:
first (middle) last 2010-12-03 1) code(); "string literal
You can probably fix this by using a ? to make the match ungreedy (that is, (.*?) instead of (.*)). We could also make this a public static method and write a couple of unit tests for it to be more certain.
Comment Actions
Ah yes. Not likely to have this kind of lines but still need to be considered. I'll change it and add some tests.