Re: [RFC v2] refs: strip out not allowed flags from ref_transaction_update

2017-09-24 Thread Thomas Gummerer
On 09/21, Michael Haggerty wrote: > On 09/13/2017 12:59 AM, Thomas Gummerer wrote: > > Callers are only allowed to pass certain flags into > > ref_transaction_update, other flags are internal to it. To prevent > > mistakes from the callers, strip the internal only flags out before > > continuing.

Re: [RFC v2] refs: strip out not allowed flags from ref_transaction_update

2017-09-21 Thread Junio C Hamano
Michael Haggerty writes: > I wouldn't worry too much about this anomaly. `REF_ISPRUNING` is an ugly > internal kludge, but allowing it in the mask doesn't make anything worse. > >> refs.c | 2 ++ >> refs.h | 8 >> 2 files changed, 10 insertions(+) >> >> diff --git a/refs.c b/refs.c >>

Re: [RFC v2] refs: strip out not allowed flags from ref_transaction_update

2017-09-21 Thread Michael Haggerty
On 09/13/2017 12:59 AM, Thomas Gummerer wrote: > Callers are only allowed to pass certain flags into > ref_transaction_update, other flags are internal to it. To prevent > mistakes from the callers, strip the internal only flags out before > continuing. > > This was noticed because of a compiler

[RFC v2] refs: strip out not allowed flags from ref_transaction_update

2017-09-12 Thread Thomas Gummerer
Callers are only allowed to pass certain flags into ref_transaction_update, other flags are internal to it. To prevent mistakes from the callers, strip the internal only flags out before continuing. This was noticed because of a compiler warning gcc 7.1.1 issued about passing a NULL parameter as