refs: document flags constants REF_*
Document the bits that can appear in the "flags" parameter passed to an each_ref_function and/or in the ref_entry::flag field. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Michael Haggerty committed
Apr 14, 2013 at 14:54 UTC
89df9c84e478b7e6055a93cf45cf37027d25b3e4
2 files changed
+24
-1
refs.c
+11
-1
@@ -157,7 +157,17 @@ struct ref_dir {
157
struct ref_entry **entries;
158
};
159
160
-/* ISSYMREF=0x01, ISPACKED=0x02, and ISBROKEN=0x04 are public interfaces */
160
+/*
161
+ * Bit values for ref_entry::flag. REF_ISSYMREF=0x01,
162
+ * REF_ISPACKED=0x02, and REF_ISBROKEN=0x04 are public values; see
163
+ * refs.h.
164
+ */
165
+
166
+/*
167
+ * The field ref_entry->u.value.peeled of this value entry contains
168
+ * the correct peeled value for the reference, which might be
169
+ * null_sha1 if the reference is not a tag or if it is broken.
170
+ */
171
#define REF_KNOWS_PEELED 0x08
172
173
/* ref_entry represents a directory of references */
refs.h
+13
@@ -10,8 +10,21 @@ struct ref_lock {
10
int force_write;
11
};
12
13
+/*
14
+ * Bit values set in the flags argument passed to each_ref_fn():
15
+ */
16
+
17
+/* Reference is a symbolic reference. */
18
#define REF_ISSYMREF 0x01
19
+
20
+/* Reference is a packed reference. */
21
#define REF_ISPACKED 0x02
22
+
23
+/*
24
+ * Reference cannot be resolved to an object name: dangling symbolic
25
+ * reference (directly or indirectly), corrupt reference file, or
26
+ * symbolic reference refers to ill-formatted reference name.
27
+ */
28
#define REF_ISBROKEN 0x04
29
30
/*