Skip to content

init: make pre-commit hook work under native Windows git #10

@MasonStation

Description

@MasonStation

phantom init installs a #!/bin/sh pre-commit hook. Works under Git for Windows (which ships bash), but may be skipped by GUI clients (GitHub Desktop, IDE integrations) or native PowerShell git configurations.

Location

  • phantom-cli/src/commands/init.rs:236

Options

  1. Document only — note the Git for Windows requirement in the README (lowest effort, probably sufficient).
  2. Detect and dual-install — additionally emit a .cmd wrapper for native Windows git.
  3. Rewrite as a single cross-platform Rust binaryphantom check --staged shelled from a thin hook script; avoids shell entirely.

Recommendation: start with option 1. Revisit if a real user reports the issue.

Severity

Functional gap — low impact; most Windows developers use Git for Windows.

Tracker: #1

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestwindowsWindows platform support

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions