get_remote_heads: convert to struct object_id
[gitweb.git] / refs.h
diff --git a/refs.h b/refs.h
index 02676498328d348bba0a28fe023eb34909264e79..7a040774890637253847e82e3ea3a90ac081f757 100644 (file)
--- a/refs.h
+++ b/refs.h
@@ -444,7 +444,23 @@ int update_ref(const char *msg, const char *refname,
 
 extern int parse_hide_refs_config(const char *var, const char *value, const char *);
 
-extern int ref_is_hidden(const char *);
+/*
+ * Check whether a ref is hidden. If no namespace is set, both the first and
+ * the second parameter point to the full ref name. If a namespace is set and
+ * the ref is inside that namespace, the first parameter is a pointer to the
+ * name of the ref with the namespace prefix removed. If a namespace is set and
+ * the ref is outside that namespace, the first parameter is NULL. The second
+ * parameter always points to the full ref name.
+ */
+extern int ref_is_hidden(const char *, const char *);
+
+enum ref_type {
+       REF_TYPE_PER_WORKTREE,
+       REF_TYPE_PSEUDOREF,
+       REF_TYPE_NORMAL,
+};
+
+enum ref_type ref_type(const char *refname);
 
 enum expire_reflog_flags {
        EXPIRE_REFLOGS_DRY_RUN = 1 << 0,