summaryrefslogtreecommitdiff
path: root/refs.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-09-25 06:24:07 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-09-25 06:24:07 (GMT)
commitd019010559b26784b0aea6cf08b43f576ef027f9 (patch)
tree3b89930775ebcca6151ec6163782881b2dd8c134 /refs.h
parent62b1cb7b135d07912a9e0025b54be39dfc79e1dd (diff)
parentc788c54cde5f7d52e4db9d4971545c3b2456ddcf (diff)
downloadgit-d019010559b26784b0aea6cf08b43f576ef027f9.zip
git-d019010559b26784b0aea6cf08b43f576ef027f9.tar.gz
git-d019010559b26784b0aea6cf08b43f576ef027f9.tar.bz2
Merge branch 'tg/refs-allowed-flags'
API error-proofing which happens to also squelch warnings from GCC. * tg/refs-allowed-flags: refs: strip out not allowed flags from ref_transaction_update
Diffstat (limited to 'refs.h')
-rw-r--r--refs.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/refs.h b/refs.h
index 78a2640..ae33a5f 100644
--- a/refs.h
+++ b/refs.h
@@ -345,6 +345,14 @@ int refs_pack_refs(struct ref_store *refs, unsigned int flags);
#define REF_FORCE_CREATE_REFLOG 0x40
/*
+ * Flags that can be passed in to ref_transaction_update
+ */
+#define REF_TRANSACTION_UPDATE_ALLOWED_FLAGS \
+ REF_ISPRUNING | \
+ REF_FORCE_CREATE_REFLOG | \
+ REF_NODEREF
+
+/*
* Setup reflog before using. Fill in err and return -1 on failure.
*/
int refs_create_reflog(struct ref_store *refs, const char *refname,