Re: [PATCH v2 03/12] struct ref_update: move "have_old" into "flags"

2015-02-17 Thread Junio C Hamano
Michael Haggerty writes: > For example I want to rename the constants to REF_NODEREF -> > REF_NO_DEREF and REF_ISPRUNING -> REF_IS_PRUNING [1], but am leaving > that for when the refs code is not in so much flux. I can reorganize the > constants and docs then. These renames are very sensible. T

Re: [PATCH v2 03/12] struct ref_update: move "have_old" into "flags"

2015-02-17 Thread Michael Haggerty
On 02/12/2015 08:15 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> On Thu, Feb 12, 2015 at 3:12 AM, Michael Haggerty >> wrote: >>> - int flags; /* REF_NODEREF? */ >>> - int have_old; /* 1 if old_sha1 is valid, 0 otherwise */ >>> + /* >>> +* One or more of REF_H

Re: [PATCH v2 03/12] struct ref_update: move "have_old" into "flags"

2015-02-12 Thread Junio C Hamano
Stefan Beller writes: > On Thu, Feb 12, 2015 at 3:12 AM, Michael Haggerty > wrote: >> - int flags; /* REF_NODEREF? */ >> - int have_old; /* 1 if old_sha1 is valid, 0 otherwise */ >> + /* >> +* One or more of REF_HAVE_OLD, REF_NODEREF, >> +* REF_DELETING, and RE

Re: [PATCH v2 03/12] struct ref_update: move "have_old" into "flags"

2015-02-12 Thread Stefan Beller
On Thu, Feb 12, 2015 at 3:12 AM, Michael Haggerty wrote: > - int flags; /* REF_NODEREF? */ > - int have_old; /* 1 if old_sha1 is valid, 0 otherwise */ > + /* > +* One or more of REF_HAVE_OLD, REF_NODEREF, > +* REF_DELETING, and REF_IS_PRUNING: > +*/ > +

[PATCH v2 03/12] struct ref_update: move "have_old" into "flags"

2015-02-12 Thread Michael Haggerty
Instead of having a separate have_old field, record this boolean value as a bit in the "flags" field. Signed-off-by: Michael Haggerty --- refs.c | 45 - 1 file changed, 28 insertions(+), 17 deletions(-) diff --git a/refs.c b/refs.c index 4de1383..6cfc