Subject: Re: [PATCH v2] hooks--pre-commit: detect non-ASCII when renaming

From: Junio C Hamano <[email-masked]>
Date: Sun, 03 Dec 2023 22:15:09 +0900

"Julian Prein via GitGitGadget" <[email-masked]> writes:

> From: Julian Prein <[email-masked]>
>
> When diff.renames is turned on, the diff-filter will not return renamed
> files (or copied ones with diff.renames=copy) and potential non-ASCII
> characters would not be caught by this hook.
>
> Use the plumbing command diff-index instead of the porcelain one to not
> be affected by diff.rename.

Makes sense.

An obvious alternative would be to pass "--no-renames" and keep
using the Porcelain "git diff", but this is how the plumbing
"diff-index" and friends are meant to be used.  Looking good.

Will queue.  Thanks.