-
Notifications
You must be signed in to change notification settings - Fork 729
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
Windows fixes #231
Windows fixes #231
Conversation
Add a GitHub workflow for continuous testing
--use-mailmap was defined as `--mailmap .mailmap` except that it would set args.mailmap to ".mailmap" rather than b".mailmap" (in other words, it accidentally set it to a string rather than a bytestring). Since the --mailmap parameter is always passed as a bytestring, we ran into errors with calling unknown functions due to the type mismatch. Signed-off-by: Elijah Newren <[email protected]>
The --path-rename flag expected an argument with a colon character (':') in it, which it assumed without checking. If the user gave an argument with no colon in it, this backtrace would be shown: File "/usr/local/bin/git-filter-repo", line 1626, in __call__ if values[0] and values[1] and not ( IndexError: list index out of range Add a real error message in place of the backtrace. Also check that there's exactly one colon; show an error message if there's more than one, as that syntax has no interpretation that is obviously the right one. Signed-off-by: Lassi Kortela <[email protected]>
Signed-off-by: Elijah Newren <[email protected]>
On Windows, we want to run with a native Python, i.e. the separator is a semicolon, and the paths should be Windows paths (although they're allowed to have forward slashes instead of backslashes). Since we're most likely running this in an MSYS2 Bash, allow for `$TEST_DIRECTORY` to pretend to be a Unix path, and translate it via `cygpath` into a Windows path. Signed-off-by: Johannes Schindelin <[email protected]>
This fixes the "TypeError: a bytes-like object is required, not 'str'" problem on Windows, letting t9391 pass. Signed-off-by: Johannes Schindelin <[email protected]>
Hrm. I see this failure:
But then, I see the same failure in |
Interesting. Not sure why this never triggered problems before, but is it possible that the program "wc" doesn't exist on some Windows boxes like it does on Linux & Mac? Maybe it exists for you, and existed at some point in the past under GitHub Actions, but doesn't exist within whatever current GitHub Actions environment for Windows provides anymore? Anyway, the patches look good to me. I'll see if I can play with the Windows tests and that suboptimal error message a bit and get it fixed up, then merge these changes. |
Merged...but I'm an evil maintainer and I rewrote history for some commits from a few months ago (I'm hiding behind the excuse that this is the filter-repo project so folks should be able to handle history rewrites, or something like that). So, I had to rebase your patches and GitHub doesn't detect it as merged. But it is merged. Thanks for the fixes! |
Thank you! |
I finally got Git Bash to accept the Windows Store version of Python, so naturally I wanted to verify that the test suite works, but that was not so, funnily enough.
With these two fixes, I can run t9391 successfully in Git for Windows v2.31.1.