From: David Turner Date: Thu, 04 Feb 2016 19:24:43 GMT Subject: Re: [PATCH v3 13/20] refs: resolve symbolic refs first Message-ID: <1454613883.5545.4.camel@twopensource.com> In-Reply-To: <20160204073742.GA20162@sigill.intra.peff.net> On Thu, 2016-02-04 at 02:37 -0500, Jeff King wrote: > On Thu, Jan 14, 2016 at 11:26:10AM -0500, David Turner wrote: > > > +static int dereference_symrefs(struct ref_transaction > > *transaction, > > + struct strbuf *err) > > +{ > > + int i; > > + int nr = transaction->nr; > > + > > + for (i = 0; i < nr; i++) { > > + struct ref_update *update = transaction > > ->updates[i]; > > + const char *resolved; > > + unsigned char sha1[20]; > > + int resolve_flags = 0; > > + int mustexist = (update->old_sha1 && > > + !is_null_sha1(update->old_sha1)); > > Coverity complains about this last line, as "update->old_sha1" is an > array. I think you want to check "update->flags & REF_HAVE_OLD" > instead? Yeah, that's right. Thanks.