From: Junio C Hamano <gitster@pobox.com>
To: "Julian Prein via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Julian Prein <druckdev@protonmail.com>
Subject: Re: [PATCH v2] hooks--pre-commit: detect non-ASCII when renaming
Date: Sun, 03 Dec 2023 22:15:09 +0900 [thread overview]
Message-ID: <xmqqplzn4eci.fsf@gitster.g> (raw)
In-Reply-To: <pull.1291.v2.git.git.1701360836307.gitgitgadget@gmail.com> (Julian Prein via GitGitGadget's message of "Thu, 30 Nov 2023 16:13:56 +0000")
"Julian Prein via GitGitGadget" <gitgitgadget@gmail.com> writes:
> From: Julian Prein <druckdev@protonmail.com>
>
> 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.
prev parent reply other threads:[~2023-12-03 13:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-14 22:17 [PATCH] hooks--pre-commit: detect non-ASCII when renaming Julian Prein via GitGitGadget
2022-07-14 23:03 ` Junio C Hamano
2022-07-14 23:08 ` Junio C Hamano
2023-11-30 16:13 ` [PATCH v2] " Julian Prein via GitGitGadget
2023-12-03 13:15 ` Junio C Hamano [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqplzn4eci.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=druckdev@protonmail.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.