Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
refs: move REF_DELETING to refs.c
author
Michael Haggerty
<mhagger@alum.mit.edu>
Thu, 12 Feb 2015 11:12:12 +0000
(12:12 +0100)
committer
Junio C Hamano
<gitster@pobox.com>
Thu, 12 Feb 2015 19:42:53 +0000
(11:42 -0800)
It is only used internally now. Document it a little bit better, too.
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Reviewed-by: Stefan Beller <sbeller@google.com>
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:
18d0fec
)
diff --git
a/refs.c
b/refs.c
index ab2f2a92cd9119a3c67d8b3b7741ae1279d747f3..5e6355c930b653cb5909cd56ba4d4e52ba7daf33 100644
(file)
--- a/
refs.c
+++ b/
refs.c
@@
-34,6
+34,12
@@
static unsigned char refname_disposition[256] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 4, 4
};
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 4, 4
};
+/*
+ * Flag passed to lock_ref_sha1_basic() telling it to tolerate broken
+ * refs (i.e., because the reference is about to be deleted anyway).
+ */
+#define REF_DELETING 0x02
+
/*
* Used as a flag to ref_transaction_delete when a loose ref is being
* pruned.
/*
* Used as a flag to ref_transaction_delete when a loose ref is being
* pruned.
diff --git
a/refs.h
b/refs.h
index afa3c4decd5562c85978e49a9e1c2a34c128b055..9bf214880f3641a60d724e566c716f989da037cc 100644
(file)
--- a/
refs.h
+++ b/
refs.h
@@
-183,12
+183,10
@@
extern int peel_ref(const char *refname, unsigned char *sha1);
* Flags controlling ref_transaction_update(), ref_transaction_create(), etc.
* REF_NODEREF: act on the ref directly, instead of dereferencing
* symbolic references.
* Flags controlling ref_transaction_update(), ref_transaction_create(), etc.
* REF_NODEREF: act on the ref directly, instead of dereferencing
* symbolic references.
- * REF_DELETING: tolerate broken refs
*
*
- *
Flags >= 0x100
are reserved for internal use.
+ *
Other flags
are reserved for internal use.
*/
#define REF_NODEREF 0x01
*/
#define REF_NODEREF 0x01
-#define REF_DELETING 0x02
/*
* Setup reflog before using. Set errno to something meaningful on failure.
/*
* Setup reflog before using. Set errno to something meaningful on failure.