author | Michael Schubert <mschub@elegosoft.com> | |
Mon, 9 May 2011 23:36:36 +0000 (01:36 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 10 May 2011 15:45:37 +0000 (08:45 -0700) | ||
commit | 4f0accd638b8d27c44066e7a866315ca67cb07ec | |
tree | e2b6076941459234ece5d55848162f019fad6a8f | tree | snapshot |
parent | ec014eac0e9e6f30cbbca616090fa2ecf74797e7 | commit | diff |
tag: disallow '-' as tag name
Disallow '-' as tag name, as well as tag names starting with '-', as it
would be cumbersome to "git checkout tags/-" because "git checkout -" is
to switch to the previous branch.
Add strbuf_check_tag_ref() as helper to check a refname for a tag.
Signed-off-by: Michael Schubert <mschub@elegosoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Disallow '-' as tag name, as well as tag names starting with '-', as it
would be cumbersome to "git checkout tags/-" because "git checkout -" is
to switch to the previous branch.
Add strbuf_check_tag_ref() as helper to check a refname for a tag.
Signed-off-by: Michael Schubert <mschub@elegosoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/tag.c | diff | blob | history |