path: root/refs.h
diff options
authorJunio C Hamano <>2006-09-21 05:02:01 (GMT)
committerJunio C Hamano <>2006-09-21 05:02:01 (GMT)
commit8da197755450d4f16018bd4b5486dc8ed88b0f2a (patch)
tree9317d63e33d83995b6346eea465a4d290f991087 /refs.h
parentcb5d709ff8a4bae19d57a470ba2b137c25938a44 (diff)
Tell between packed, unpacked and symbolic refs.
This adds a "int *flag" parameter to resolve_ref() and makes for_each_ref() family to call callback function with an extra "int flag" parameter. They are used to give two bits of information (REF_ISSYMREF and REF_ISPACKED) about the ref. Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'refs.h')
1 files changed, 3 insertions, 1 deletions
diff --git a/refs.h b/refs.h
index 886c857..305d408 100644
--- a/refs.h
+++ b/refs.h
@@ -14,7 +14,9 @@ struct ref_lock {
* Calls the specified function for each ref file until it returns nonzero,
* and returns the value
-typedef int each_ref_fn(const char *refname, const unsigned char *sha1, void *cb_data);
+#define REF_ISSYMREF 01
+#define REF_ISPACKED 02
+typedef int each_ref_fn(const char *refname, const unsigned char *sha1, int flags, void *cb_data);
extern int head_ref(each_ref_fn, void *);
extern int for_each_ref(each_ref_fn, void *);
extern int for_each_tag_ref(each_ref_fn, void *);