Summary: | [webkitscmpy] Add access to `git config` | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Jonathan Bedard <jbedard> | ||||||||||
Component: | Tools / Tests | Assignee: | Jonathan Bedard <jbedard> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | aakash_jain, dewei_zhu, slewis, webkit-bug-importer | ||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||
Version: | WebKit Nightly Build | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=225985 | ||||||||||||
Bug Depends on: | |||||||||||||
Bug Blocks: | 228662 | ||||||||||||
Attachments: |
|
Description
Jonathan Bedard
2021-07-29 11:59:27 PDT
Created attachment 434553 [details]
Patch
Created attachment 434554 [details]
Patch
Created attachment 434758 [details]
Patch
Comment on attachment 434758 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=434758&action=review > Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:280 > + if command.returncode: should log a warning/error here about failure. > Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:286 > + result[parts[0]] = '='.join(parts[1:]) why join? can there be more than one = in a line in the output of 'git config -l' > Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:597 > + RE_SINGLE_TOP = re.compile(r'^\[\s*(?P<key>\S+)\s*\]') might be a good idea to put an example of expected strings in a comment along-with all these REs. Comment on attachment 434758 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=434758&action=review >> Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:286 >> + result[parts[0]] = '='.join(parts[1:]) > > why join? can there be more than one = in a line in the output of 'git config -l' Git allows it, although I'm not sure if it happens in practice. Do something like `git config --global user.name "foo=bar"`and then `git config -l` to see what I mean. >> Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:597 >> + RE_SINGLE_TOP = re.compile(r'^\[\s*(?P<key>\S+)\s*\]') > > might be a good idea to put an example of expected strings in a comment along-with all these REs. Ok Created attachment 434837 [details]
Patch
Comment on attachment 434837 [details]
Patch
rs=me
Committed r280604 (240222@main): <https://commits.webkit.org/240222@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 434837 [details]. |