Subject: Re: [PATCH] Extend sample pre-commit hook to check for non ascii file/usernames

From: Jakub Narebski <[email-masked]>
Date: Tue, 12 May 2009 23:55:59 +0200

On Tue, 12 May 2009, Heiko Voigt wrote:

> At the moment non-ascii encodings of file/usernames are not very well
> supported by git. This will most likely change in the future but to
> allow repositories to be portable among different file/operating systems
> this check is enabled by default.

> +	# non-ascii username issue a warning in git gui so tell the
> +	# user to change it
> +	if ! git config user.name | is_ascii; then
> +		echo "Please only use ascii characters in your username!"
> +		exit 1
> +	fi
> +
> +	if ! git config user.email | is_ascii; then
> +		echo "Please only use ascii characters in your email!"
> +		exit 1
> +	fi

Actually 1.) there is no easy way to avoid non-ASCII names at least
in user.name (I think they are not allowed in email), but 2.) there
is no trouble with non-ASCII encoding of commits, as they have 
'encoding' header if it is not uft-8 (see *encoding* config variables).

-- 
Jakub Narebski
Poland