RESOLVED FIXED284312
`git-webkit pr` raises when on detached HEAD
https://bugs.webkit.org/show_bug.cgi?id=284312
Summary `git-webkit pr` raises when on detached HEAD
Sam Sneddon [:gsnedders]
Reported 2024-12-09 12:20:48 PST
gsnedders@gsnedders-margot WebKit % ./Tools/Scripts/git-webkit pr --commit Traceback (most recent call last): File "/Volumes/gsnedders/projects/WebKit/./Tools/Scripts/git-webkit", line 63, in <module> sys.exit(program.main( File "/Volumes/gsnedders/projects/WebKit/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py", line 185, in main return parsed.main( File "/Volumes/gsnedders/projects/WebKit/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py", line 754, in main branch_point = cls.pull_request_branch_point(repository, args, **kwargs) File "/Volumes/gsnedders/projects/WebKit/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py", line 254, in pull_request_branch_point if not repository.dev_branches.match(repository.branch) and (repository.branch is None or repository.branch in repository.DEFAULT_BRANCHES or TypeError: expected string or bytes-like object This is a regression from https://commits.webkit.org/287226@main, bug 283444. This is from the newly added `not repository.dev_branches.match(repository.branch)`, because this is always evaluated, even when `repository.branch` is `None`, and `re.Pattern.match` cannot match against `None`.
Attachments
Radar WebKit Bug Importer
Comment 1 2024-12-09 12:21:10 PST
Brianna Fan
Comment 2 2024-12-09 12:34:39 PST
EWS
Comment 3 2024-12-18 11:17:35 PST
Committed 288027@main (58deabc6ad47): <https://commits.webkit.org/288027@main> Reviewed commits have been landed. Closing PR #37655 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.