summaryrefslogtreecommitdiff
path: root/refs.h
diff options
context:
space:
mode:
authorDavid Turner <dturner@twopensource.com>2015-07-31 02:06:18 -0400
committerJunio C Hamano <gitster@pobox.com>2015-07-31 10:39:04 -0700
commit266b18273a742a33970e634d1858f292befdf943 (patch)
tree11a91064dada002949a634393882489543e12db1 /refs.h
parent2036cb98d00b888262c3dbfad7e14ffd95165028 (diff)
downloadgit-266b18273a742a33970e634d1858f292befdf943.tar.gz
refs: add ref_type function
Add a function ref_type, which categorizes refs as per-worktree, pseudoref, or normal ref. Later, we will use this in refs.c to treat pseudorefs specially. Alternate ref backends may use it to treat both pseudorefs and per-worktree refs differently. Signed-off-by: David Turner <dturner@twopensource.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs.h')
-rw-r--r--refs.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/refs.h b/refs.h
index 4f1b236568..1927bda993 100644
--- a/refs.h
+++ b/refs.h
@@ -380,6 +380,14 @@ 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 *);
+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,
EXPIRE_REFLOGS_UPDATE_REF = 1 << 1,