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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Julian Prein via GitGitGadget" <gitgitgadget@xxxxxxxxx> writes:

> From: Julian Prein <druckdev@xxxxxxxxxxxxxx>
>
> 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.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux