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

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

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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]