Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
refs: document flags constants REF_*
author
Michael Haggerty
<mhagger@alum.mit.edu>
Sun, 14 Apr 2013 12:54:16 +0000
(14:54 +0200)
committer
Junio C Hamano
<gitster@pobox.com>
Wed, 1 May 2013 22:33:09 +0000
(15:33 -0700)
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>
refs.c
patch
|
blob
|
history
refs.h
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
27ec394
)
diff --git
a/refs.c
b/refs.c
index 6770e962a94cc4f1709fe7e7741f0a896a416aed..6b3511ee0beb983e05519aa702494039f1e7cfd8 100644
(file)
--- a/
refs.c
+++ b/
refs.c
@@
-157,7
+157,17
@@
struct ref_dir {
struct ref_entry **entries;
};
struct ref_entry **entries;
};
-/* ISSYMREF=0x01, ISPACKED=0x02, and ISBROKEN=0x04 are public interfaces */
+/*
+ * Bit values for ref_entry::flag. REF_ISSYMREF=0x01,
+ * REF_ISPACKED=0x02, and REF_ISBROKEN=0x04 are public values; see
+ * refs.h.
+ */
+
+/*
+ * The field ref_entry->u.value.peeled of this value entry contains
+ * the correct peeled value for the reference, which might be
+ * null_sha1 if the reference is not a tag or if it is broken.
+ */
#define REF_KNOWS_PEELED 0x08
/* ref_entry represents a directory of references */
#define REF_KNOWS_PEELED 0x08
/* ref_entry represents a directory of references */
diff --git
a/refs.h
b/refs.h
index d6c2fe2dfbd9e16a871ac960c27d9a68cc45102f..f111024a18049c6bca36aa1e03f67a6d9475c42e 100644
(file)
--- a/
refs.h
+++ b/
refs.h
@@
-10,8
+10,21
@@
struct ref_lock {
int force_write;
};
int force_write;
};
+/*
+ * Bit values set in the flags argument passed to each_ref_fn():
+ */
+
+/* Reference is a symbolic reference. */
#define REF_ISSYMREF 0x01
#define REF_ISSYMREF 0x01
+
+/* Reference is a packed reference. */
#define REF_ISPACKED 0x02
#define REF_ISPACKED 0x02
+
+/*
+ * Reference cannot be resolved to an object name: dangling symbolic
+ * reference (directly or indirectly), corrupt reference file, or
+ * symbolic reference refers to ill-formatted reference name.
+ */
#define REF_ISBROKEN 0x04
/*
#define REF_ISBROKEN 0x04
/*