Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/refs.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-02-04 09:14:40 +0300
committerJunio C Hamano <junkio@cox.net>2007-02-04 10:05:34 +0300
commitd77ee72662a821d66ae218056f0103eb24d8d4b4 (patch)
treee22abdbd11735a0669362f934ae723d233c87e2b /refs.c
parenteb8381c88518b10d683a29deea1d43ed671f14ec (diff)
parent8d0fc48f27304ac1bc7abf802ec53fe66fedb15a (diff)
Merge branch 'master' into np/dreflog
This is to resolve conflicts early in preparation for possible inclusion of "reflog on detached HEAD" series by Nico, as having it in 1.5.0 would really help us remove confusion between detached and attached states. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'refs.c')
-rw-r--r--refs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/refs.c b/refs.c
index da09e434c7..03e8dfec9f 100644
--- a/refs.c
+++ b/refs.c
@@ -663,6 +663,8 @@ struct ref_lock *lock_ref_sha1(const char *ref, const unsigned char *old_sha1)
struct ref_lock *lock_any_ref_for_update(const char *ref, const unsigned char *old_sha1)
{
+ if (check_ref_format(ref) == -1)
+ return NULL;
return lock_ref_sha1_basic(ref, old_sha1, NULL);
}