]> git.ipfire.org Git - thirdparty/git.git/commit
git-check-ref-format: reject funny ref names.
authorJunio C Hamano <junkio@cox.net>
Sun, 16 Oct 2005 00:10:14 +0000 (17:10 -0700)
committerJunio C Hamano <junkio@cox.net>
Sun, 16 Oct 2005 00:10:14 +0000 (17:10 -0700)
commit652d5dc6c0aef842eafcd9d2f73a4836d20734e2
tree81f2fb438b53db399041ce72c8b4894bd7729568
parent494245d6d1ad365e9b8d76668ed7ff3f888057b1
git-check-ref-format: reject funny ref names.

Update check_ref_format() function to reject ref names that:

 * has a path component that begins with a ".", or
 * has a double dots "..", or
 * has ASCII control character, "~", "^", ":" or SP, anywhere, or
 * ends with a "/".

Use it in 'git-checkout -b', 'git-branch', and 'git-tag' to make sure
that newly created refs are well-formed.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Makefile
check-ref-format.c [new file with mode: 0644]
git-branch.sh
git-checkout.sh
git-tag.sh
refs.c