receive-pack: don't pass non-existent refs to post-{receive,update} hooks
[gitweb.git] / refs.c
diff --git a/refs.c b/refs.c
index a615043b34cd6d0507d8a30f7bd69445ec9f2456..43e9225cd603928d2125d754d93405f508ae4020 100644 (file)
--- a/refs.c
+++ b/refs.c
@@ -1851,7 +1851,7 @@ int update_ref(const char *action, const char *refname,
        return 0;
 }
 
-int ref_exists(char *refname)
+int ref_exists(const char *refname)
 {
        unsigned char sha1[20];
        return !!resolve_ref(refname, sha1, 1, NULL);