diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-09-25 15:24:07 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-09-25 15:24:07 +0900 |
commit | d019010559b26784b0aea6cf08b43f576ef027f9 (patch) | |
tree | 3b89930775ebcca6151ec6163782881b2dd8c134 /refs.c | |
parent | 62b1cb7b135d07912a9e0025b54be39dfc79e1dd (diff) | |
parent | c788c54cde5f7d52e4db9d4971545c3b2456ddcf (diff) | |
download | git-d019010559b26784b0aea6cf08b43f576ef027f9.tar.gz |
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.c')
-rw-r--r-- | refs.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -939,6 +939,8 @@ int ref_transaction_update(struct ref_transaction *transaction, return -1; } + flags &= REF_TRANSACTION_UPDATE_ALLOWED_FLAGS; + flags |= (new_sha1 ? REF_HAVE_NEW : 0) | (old_sha1 ? REF_HAVE_OLD : 0); ref_transaction_add_update(transaction, refname, flags, |