correctly handle `uname-cmd` that doesn't point to an executable file by gcmarx · Pull Request #2026 · gitpython-developers/GitPython

As argued in #2027 (comment), I think we should actually merge cffa264 -- that is, this PR as it was before the change to using strings -- before proceeding with further changes. I think that could be done at any time. I suggest rewinding this PR to that point (you can preserve the extra commits on their own separate branch of course).

There are some minor refinements that could be included with that, but they can just as easily be done afterwards (for example, I can make a small PR later that includes them), so they're not blocking. I've included review comments below showing them as suggested-change diffs.

In addition to the reasons given in #2027 (comment) for starting that way, I also think it matches the scope you may have intended for this PR originally, based on the PR title.

This is not to say that the attempt to examine the contents of the git executable file to discern if it is a Cygwin build should be discarded entirely -- only that I recommend integrating the working changes from before that, and then continuing with that subsequently. To that end, I've also included some review comments pertaining to those subsequent commits. To avoid confusion, I have refrained from including any suggested-change diffs in those.


...incidentally, is there a way for me to run the test pipeline locally without pushing my changes up first?

Yes, certainly. There are instructions in the readme, there is tox.ini if you want to use the tox runner, and the commands in the CI workflows in .github/workflows can sometimes be useful. I'm also happy to help with any questions about setting that up or problems that arise with it (and please feel free to ping me about it). There is also software to attempt to run GitHub Actions workflows locally, such as act, though I have not tried that on this repository and I don't know how well it would work.

However, in order to run the Cygwin tests on your local machine--using any of those techniques or others--I think you would need to have a Windows system (or other system capable of running Windows programs) with Cygwin installed on it.