RESOLVED FIXED 228597
[webkitscmpy] Add access to `git config`
https://bugs.webkit.org/show_bug.cgi?id=228597
Summary [webkitscmpy] Add access to `git config`
Jonathan Bedard
Reported 2021-07-29 11:59:27 PDT
We need a function which provides machine-readable access to the git config.
Attachments
Patch (8.11 KB, patch)
2021-07-29 12:02 PDT, Jonathan Bedard
no flags
Patch (8.15 KB, patch)
2021-07-29 12:04 PDT, Jonathan Bedard
no flags
Patch (8.51 KB, patch)
2021-08-02 08:45 PDT, Jonathan Bedard
no flags
Patch (8.56 KB, patch)
2021-08-03 09:55 PDT, Jonathan Bedard
ews-feeder: commit-queue-
Radar WebKit Bug Importer
Comment 1 2021-07-29 12:01:29 PDT
Jonathan Bedard
Comment 2 2021-07-29 12:02:49 PDT
Jonathan Bedard
Comment 3 2021-07-29 12:04:57 PDT
Jonathan Bedard
Comment 4 2021-08-02 08:45:21 PDT
Aakash Jain
Comment 5 2021-08-03 09:16:49 PDT
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.
Jonathan Bedard
Comment 6 2021-08-03 09:26:10 PDT
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
Jonathan Bedard
Comment 7 2021-08-03 09:55:11 PDT
Aakash Jain
Comment 8 2021-08-03 11:53:41 PDT
Comment on attachment 434837 [details] Patch rs=me
EWS
Comment 9 2021-08-03 12:00:40 PDT
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].
Note You need to log in before you can comment on or make changes to this bug.