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

Re: [PATCH 3/3] unpack-trees: simplify via strnncmp()

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Jun 16, 2014, 20:19 UTC
Message-ID
<20140616201905.GP8557@google.com>
In-Reply-To
<ee1716e209794a66eb9677e798164a356276700e.1402945507.git.jmmahler@gmail.com>
Jeremiah Mahler wrote:
> --- a/unpack-trees.c
> +++ b/unpack-trees.c
[...]
Show 6 quoted lines
> @@ -678,7 +667,7 @@ static int find_cache_pos(struct traverse_info *info,
>  			ce_len = ce_slash - ce_name;
>  		else
>  			ce_len = ce_namelen(ce) - pfxlen;
> -		cmp = name_compare(p->path, p_len, ce_name, ce_len);
> +		cmp = strnncmp(p->path, p_len, ce_name, ce_len);
Likewise --- the sign of the result is important here.
Previous: Jeremiah Mahler
Message 8 of 8 in “add strnncmp() function”
  1. 0/3 add strnncmp() functionJeremiah Mahler, Jun 16, 2014
  2. 1/3 add strnncmp() functionJeremiah Mahler, Jun 16, 2014
  3. Jonathan NiederJun 16, 2014
  4. 2/3 tree-walk: simplify via strnncmp()Jeremiah Mahler, Jun 16, 2014
  5. Jonathan NiederJun 16, 2014
  6. Jeremiah MahlerJun 17, 2014
  7. 3/3 unpack-trees: simplify via strnncmp()Jeremiah Mahler, Jun 16, 2014
  8. Jonathan NiederJun 16, 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.