Title: use `sys.platform == "cygwin"` to figure out when we are using cygwin by gcmarx · Pull Request #2027 · gitpython-developers/GitPython · GitHub
Open Graph Title: use `sys.platform == "cygwin"` to figure out when we are using cygwin by gcmarx · Pull Request #2027 · gitpython-developers/GitPython
X Title: use `sys.platform == "cygwin"` to figure out when we are using cygwin by gcmarx · Pull Request #2027 · gitpython-developers/GitPython
Description: The current logic for detecting cygwin is: if sys.platform == "win32", then it's not cygwin if the passed-in git executable is None, then it's not cygwin git finally, is there a uname executable in the same folder as the git executable, and if so, does the output of that command include "CYGWIN"? if so, then it's cygwin In the python 3.7 docs for sys.platform, Cygwin systems have sys.platform == "cygwin". Since Python 3.7 is the oldest version still supported by GitPython, it stands to reason that we can rely on that being true for all supported Python versions. The logic I propose is: if the git executable you passed in is None, it's not cygwin git if sys.platform == 'cygwin', then it's cygwin git This is simple enough for a single expression, so I replaced the body of the is_cygwin function with that expression and removed is_cygwin_git and friends completely. I don't know if there's such a thing as sys.platform == 'cygwin' and the git not being cygwin git, but if there is, I don't think the existing code deals with that anyway, so this seems to return the same result and would fail in the same way.
Open Graph Description: The current logic for detecting cygwin is: if sys.platform == "win32", then it's not cygwin if the passed-in git executable is None, then it's not cygwin git finally, is there a ...
X Description: The current logic for detecting cygwin is: if sys.platform == "win32", then it's not cygwin if the passed-in git executable is None, then it's not cygwin git fina...
Opengraph URL: https://github.com/gitpython-developers/GitPython/pull/2027
X: @github
Domain: redirect.github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:7e2f3f61-010e-a9e2-56bb-59e9704adf3d |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 820E:240939:4E02DE:695E6F:69696FA8 |
| html-safe-nonce | 064866b1a51a1a5095b0438e9027add05c1774fcaa05568d9e9664e230592af6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MjBFOjI0MDkzOTo0RTAyREU6Njk1RTZGOjY5Njk2RkE4IiwidmlzaXRvcl9pZCI6IjMxOTIxNDgzMzkwMTYxNjczMzYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 1d3db7ba8c48cde1011ad51ca03e46545f27d9be02f26db723aa57f3d3a62d26 |
| hovercard-subject-tag | pull_request:2537651784 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/gitpython-developers/GitPython/pull/2027/files |
| twitter:image | https://avatars.githubusercontent.com/u/97672150?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/97672150?s=400&v=4 |
| og:image:alt | The current logic for detecting cygwin is: if sys.platform == "win32", then it's not cygwin if the passed-in git executable is None, then it's not cygwin git finally, is there a ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | c6f193beb8ff08443adc07685d75302ab8aaf0a135f6e251c3ff3112c8deb881 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/gitpython-developers/GitPython git https://github.com/gitpython-developers/GitPython.git |
| octolytics-dimension-user_id | 503709 |
| octolytics-dimension-user_login | gitpython-developers |
| octolytics-dimension-repository_id | 1126087 |
| octolytics-dimension-repository_nwo | gitpython-developers/GitPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1126087 |
| octolytics-dimension-repository_network_root_nwo | gitpython-developers/GitPython |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ec4d88fbe7ed62446d90b0a6d8e6db4248a8f8b8 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width