Skip to content

correctly handle uname-cmd that doesn't point to an executable file #2026

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
May 28, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Revert "check for the existence/execute bit on the uname command befo…
…re trying to run it"

This reverts commit de5e57c.
  • Loading branch information
gcmarx committed May 22, 2025
commit 58ff723e6757af3c508e2a9424d287e5016ac230
6 changes: 0 additions & 6 deletions git/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,13 +463,7 @@ def _is_cygwin_git(git_executable: str) -> bool:
git_dir = osp.dirname(res[0]) if res else ""

# Just a name given, not a real path.
# Let's see if the same path has uname
uname_cmd = osp.join(git_dir, "uname")
if not (osp.isfile(uname_cmd) and os.access(uname_cmd, os.X_OK)):
_logger.debug(f"File {uname_cmd} either does not exist or is not executable.")
_is_cygwin_cache[git_executable] = is_cygwin
return is_cygwin

process = subprocess.Popen([uname_cmd], stdout=subprocess.PIPE, universal_newlines=True)
uname_out, _ = process.communicate()
# retcode = process.poll()
Expand Down