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

Re: [PATCH 2/3] unpack-trees: fix path search bug in verify_absent

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jan 2, 2009, 21:59 UTC
Message-ID
<alpine.DEB.1.00.0901022248070.27818@racer>
In-Reply-To
<1230843273-11056-3-git-send-email-drizzd@aon.at>
Hi,
On Thu, 1 Jan 2009, Clemens Buchacher wrote:
> Commit 0cf73755 (unpack-trees.c: assume submodules are clean during
> check-out) changed an argument to verify_absent from 'path' to 'ce',
> which is however shadowed by a local variable of the same name.
This explanation makes sense.  However, this:
Show 10 quoted lines
> @@ -289,7 +289,8 @@ static int unpack_nondirectories(int n, unsigned long mask, unsigned long dirmas
>  	return 0;
>  }
>  
> -static int unpack_callback(int n, unsigned long mask, unsigned long dirmask, struct name_entry *names, struct traverse_info *info)
> +static int unpack_callback(int n, unsigned long mask, unsigned long dirmask,
> +		struct name_entry *names, struct traverse_info *info)
>  {
>  	struct cache_entry *src[5] = { NULL, };
>  	struct unpack_trees_options *o = info->data;
... is distracting during review, and this:
Show 8 quoted lines
> @@ -517,22 +518,22 @@ static int verify_clean_subdirectory(struct cache_entry *ce, const char *action,
>  	namelen = strlen(ce->name);
>  	pos = index_name_pos(o->src_index, ce->name, namelen);
>  	if (0 <= pos)
> -		return cnt; /* we have it as nondirectory */
> +		return 0; /* we have it as nondirectory */
>  	pos = -pos - 1;
>  	for (i = pos; i < o->src_index->cache_nr; i++) {

... is not accounted for in the commit message. Intended or not, that is the question.

Ciao, Dscho "whether 'tis noble"

Previous: Miklos VajnaNext: Clemens Buchacher
Message 8 of 20 in “unpack-trees: fix D/F conflict bugs in verify_absent”
  1. Clemens BuchacherJan 1, 2009
  2. 1/3 unpack-trees: handle failure in verify_absentClemens Buchacher, Jan 1, 2009
  3. 2/3 unpack-trees: fix path search bug in verify_absentClemens Buchacher, Jan 1, 2009
  4. 3/3 unpack-trees: remove redundant path search in verify_absentClemens Buchacher, Jan 1, 2009
  5. Junio C HamanoJan 6, 2009
  6. Johannes SchindelinJan 2, 2009
  7. Miklos VajnaJan 3, 2009
  8. Johannes SchindelinJan 2, 2009
  9. Clemens BuchacherJan 3, 2009
  10. Johannes SchindelinJan 3, 2009
  11. Junio C HamanoJan 4, 2009
  12. Clemens BuchacherJan 4, 2009
  13. Johannes SchindelinJan 6, 2009
  14. 0/2 unpack-trees: handle lstat failures in verify_absentJonathan Nieder, Jan 13, 2011
  15. 1/2 unpack-trees: handle lstat failure for existing directoryJonathan Nieder, Jan 13, 2011
  16. Miles BaderJan 13, 2011
  17. Jonathan NiederJan 13, 2011
  18. 2/2 unpack-trees: handle lstat failure for existing fileJonathan Nieder, Jan 13, 2011
  19. Clemens BuchacherJan 13, 2011
  20. Junio C HamanoJan 1, 2009

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.