Bug 228619 - [git-webkit] Not all platforms support more -F
Summary: [git-webkit] Not all platforms support more -F
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jonathan Bedard
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-07-29 16:14 PDT by Jonathan Bedard
Modified: 2021-08-02 10:26 PDT (History)
6 users (show)

See Also:


Attachments
Patch (3.03 KB, patch)
2021-07-29 16:18 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch for landing (2.79 KB, patch)
2021-07-30 08:40 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Bedard 2021-07-29 16:14:43 PDT
Seems like not all platforms support -F being passed to 'more'
Comment 1 Radar WebKit Bug Importer 2021-07-29 16:14:58 PDT
<rdar://problem/81296290>
Comment 2 Jonathan Bedard 2021-07-29 16:18:14 PDT
Created attachment 434584 [details]
Patch
Comment 3 Aakash Jain 2021-07-30 08:17:58 PDT
rs=me
Comment 4 Jonathan Bedard 2021-07-30 08:40:42 PDT
Created attachment 434633 [details]
Patch for landing
Comment 5 EWS 2021-07-30 09:35:18 PDT
Committed r280478 (240113@main): <https://commits.webkit.org/240113@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 434633 [details].
Comment 6 Alexey Proskuryakov 2021-07-30 22:26:59 PDT
Comment on attachment 434633 [details]
Patch for landing

View in context: https://bugs.webkit.org/attachment.cgi?id=434633&action=review

> Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py:124
> +            more = subprocess.Popen([which('more')] + ['-F'] if platform.system() == 'Darwin' else [], stdin=child.stdout)

Not new with this patch, but what is `which` doing here?
Comment 7 Jonathan Bedard 2021-08-02 08:25:18 PDT
Comment on attachment 434633 [details]
Patch for landing

View in context: https://bugs.webkit.org/attachment.cgi?id=434633&action=review

>> Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py:124
>> +            more = subprocess.Popen([which('more')] + ['-F'] if platform.system() == 'Darwin' else [], stdin=child.stdout)
> 
> Not new with this patch, but what is `which` doing here?

It's coming a library, whichcraft (import on line 31), basically the cross-platform equivalent of running `/usr/bin/which more`. It's giving us the path to the `more` executable. I think it was Don Olmstead that recommended this approach for Windows when I was working on some of the git and svn stuff last year, and I've been doing it whenever we need to run shell commands on multiple platforms.
Comment 8 Alexey Proskuryakov 2021-08-02 10:26:34 PDT
it's almost certainly useless on Unix, as "which" won't find anything that Popen can't find on its own. Not sure what good it could be doing on Windows, but maybe there is some... witchcraft there.