ggshield secret scan pre-commit crashes with WinError 206 on large Windows merges

On Windows, ggshield secret scan pre-commit crashes with [WinError 206] The filename or extension is too long when committing a merge with many files and long file names. ggshield builds a git command line that exceeds Windows path limits.

A fix was merged and shipped in the release after the report, shortening how the git command is constructed. The reporter tested the fix branch and confirmed it resolves the crash.

Source: https://github.com/GitGuardian/ggshield/issues/1032

Source: https://github.com/GitGuardian/ggshield/issues/1032