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>
This commit is contained in:

committed by
Junio C Hamano

parent
2036cb98d0
commit
266b18273a
8
refs.h
8
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,
|
||||
|
Reference in New Issue
Block a user