Re: [PATCH] Extend sample pre-commit hook to check for non ascii filenames
- From
Julian Phillips <julian@quantumfyre.co.uk>
- Date
- May 18, 2009, 20:35 UTC
- Message-ID
- <alpine.LNX.2.00.0905182132170.27823@reaper.quantumfyre.co.uk>
- In-Reply-To
- <20090518095044.GB910@heiko-voigts-macbook.local>
On Mon, 18 May 2009, Heiko Voigt wrote:
Show 7 quoted lines
> +if [ "$allownonascii" != "true" ] > +then > + # until git can handle non-ascii filenames gracefully > + # prevent them to be added into the repository > + if ! git diff --cached --name-only --diff-filter=A -z \ > + | tr "\0" "\n" | is_ascii; then > + echo "Error: Preventing to add a non-ascii filename."
This would read better as:
+ echo "Error: Attempt to add a non-ascii filename."
(after all the prevention itself is a result of the error, not the cause of it)
If you want to keep the preventing, then you need to at least correct the english:
> + echo "Error: Preventing addition of a non-ascii filename."
-- Julian --- QOTD: Money isn't everything, but at least it keeps the kids in touch.