Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
Improved error message from git-rebase
[gitweb.git]
/
refs.c
diff --git
a/refs.c
b/refs.c
index 12e46b8bbefb35e5d402b3c8ef20dd9e4263e81a..3db444cad2b24a1b44ff8a2dae1aa6818b61cbea 100644
(file)
--- a/
refs.c
+++ b/
refs.c
@@
-710,6
+710,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);
}