author | Junio C Hamano <gitster@pobox.com> | |
Wed, 2 Jan 2008 06:33:20 +0000 (22:33 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 2 Jan 2008 10:28:54 +0000 (02:28 -0800) | ||
commit | 5f7b202a7fa8ffbf076c456106750b2bb7732ba4 | |
tree | 0acba82e3731e1fa1a28dda325d6b48a7da78dbb | tree | snapshot |
parent | 49b9362fd35d45dc94ea15006c4bb88671b8da7d | commit | diff |
lock_any_ref_for_update(): reject wildcard return from check_ref_format
Recent check_ref_format() returns -3 as well as -1 (general
error) and -2 (less than two levels). The caller was explicitly
checking for -1, to allow "HEAD" but still needed to disallow
bogus refs.
This introduces symbolic constants for the return values from
check_ref_format() to make them read better and more
meaningful. Normal ref creation codepath can still treat
non-zero return values as errors.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Recent check_ref_format() returns -3 as well as -1 (general
error) and -2 (less than two levels). The caller was explicitly
checking for -1, to allow "HEAD" but still needed to disallow
bogus refs.
This introduces symbolic constants for the return values from
check_ref_format() to make them read better and more
meaningful. Normal ref creation codepath can still treat
non-zero return values as errors.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs.c | diff | blob | history | |
refs.h | diff | blob | history |