Skip to content

(Windows) Panic during git test if -x script contains characters which are invalid in a file path #1629

@rmvermeulen

Description

@rmvermeulen

Description of the bug

Running a git test run ... where the script part contains e.g. : panics on Windows.
It seems the : is copied as-is into the filepath, and because it's Windows, that's not ok. On WSL it works fine.

Minimal reproduction

git test run main..HEAD -x 'echo :'

Expected behavior

I expected the script to run as usual, meaning I expect that the command will be converted to a valid path
before trying to make a new directory.

Actual behavior

While running git test main..HEAD -x 'pnpm check:prettier' I got the following output:

The application panicked (crashed).
Message:  A fatal error occurred:
   0: Failed waiting on workers
   1: Worker 1 failed when processing commit ec9d22ab59b5d0aca2679c8e5db19ddd07c5b34f: Creating command directory "D:/Projects/awpw-node/.git/branchless\\test\\13f2bb5e83b30b6b69add54247527753ed5c8ef1\\pnpm__run__check:prettier"

Version of rustc

rustc 1.88.0-nightly (2e6882ac5 2025-05-05)

Automated bug report

git-branchless-bug-report.txt

edit: typos

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions