Re: [PATCH v3] remote: add --fetch and --both options to set-url
- From
Jeff King <peff@peff.net>
- Date
- Dec 17, 2014, 14:28 UTC
- Message-ID
- <20141217142800.GA20766@peff.net>
- In-Reply-To
- <5257945.aZPNBJ6Uhr@al>
On Wed, Dec 17, 2014 at 03:20:58PM +0100, Peter Wu wrote:
Show 14 quoted lines
> > There are 2 warning "dangling else", line 1570 and 1578
> > I think we should use:
> >
> > for (i = 0; i < remote->pushurl_nr; i++) {
> > if (!regexec(&old_regex, remote->pushurl[i], 0, NULL, 0))
> > matches++;
> > else
> > negative_matches++;
> > }
> >
>
> Good catch, strange enough I did not get any warnings from my compiler
> or Clang's static analyzer. I have submitted a new patch which treats
> the accumulated comments.Yeah, gcc does not seem to care, but compiling with clang (3.5.0 here) does notice it.
C's parser matches what your indentation indicates, so it is just a style fixup, not a bug (but one I agree is worth addressing).
-Peff