Change check_refname_format() to reject unnormalized refnames
commita40e6fb67a4aed2d5ffde5792bf7f1996d9666e1
authorMichael Haggerty <mhagger@alum.mit.edu>
Thu, 15 Sep 2011 21:10:30 +0000 (15 23:10 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 5 Oct 2011 20:45:30 +0000 (5 13:45 -0700)
tree25301632521d5e44177d076b255746679755ba92
parenta5e4ec063afea050d09773f0aa5dcb95a82a31ec
Change check_refname_format() to reject unnormalized refnames

Since much of the infrastructure does not work correctly with
unnormalized refnames, change check_refname_format() to reject them.

Similarly, change "git check-ref-format" to reject unnormalized
refnames by default.  But add an option --normalize, which causes "git
check-ref-format" to normalize the refname before checking its format,
and print the normalized refname.  This is exactly the behavior of the
old --print option, which is retained but deprecated.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-check-ref-format.txt
builtin/check-ref-format.c
refs.c
refs.h
t/t1402-check-ref-format.sh