git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Peter Wu
Message 7 of 7 in “remote: add --fetch and --both options to set-url”
  1. remote: add --fetch and --both options to set-urlPeter Wu, Nov 25, 2014
  2. Eric SunshineNov 25, 2014
  3. Peter WuNov 25, 2014
  4. Jeff KingDec 4, 2014
  5. Torsten BögershausenDec 17, 2014
  6. Peter WuDec 17, 2014
  7. Jeff KingDec 17, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.