`--check` prefixed every path with the repository root unconditionally, so passing an absolute path produced a bogus `$root//abs/path`, cp failed, and the subsequent cmp reported the file as non-conforming. The exit status happened to be 1, which looked correct while being reached for the wrong reason. In-place mode was unaffected -- it cds to the root and hands the list straight to Emacs, where absolute paths resolve normally, which is why the pre-commit hook worked. Normalize both the copy and the compare through an abspath helper so relative and absolute paths behave identically in either mode. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
3.0 KiB
Executable File
3.0 KiB
Executable File