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

Re: [PATCH 1/4] read-cache: fix wrong 'the_index' usage

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 3, 2013, 17:09 UTC
Message-ID
<7v4ndfi0ir.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1369922181-31016-2-git-send-email-felipe.contreras@gmail.com>
Felipe Contreras <felipe.contreras@gmail.com> writes:
> We are dealing with the 'istate' index, not 'the_index'.
>
> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
> ---
Good catch; will apply.
Show 16 quoted lines
>  read-cache.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/read-cache.c b/read-cache.c
> index 04ed561..5253ec5 100644
> --- a/read-cache.c
> +++ b/read-cache.c
> @@ -626,7 +626,7 @@ int add_to_index(struct index_state *istate, const char *path, struct stat *st,
>  			if (*ptr == '/') {
>  				struct cache_entry *foundce;
>  				++ptr;
> -				foundce = index_name_exists(&the_index, ce->name, ptr - ce->name, ignore_case);
> +				foundce = index_name_exists(istate, ce->name, ptr - ce->name, ignore_case);
>  				if (foundce) {
>  					memcpy((void *)startPtr, foundce->name + (startPtr - ce->name), ptr - startPtr);
>  					startPtr = ptr;
Previous: Felipe ContrerasNext: Felipe Contreras
Message 3 of 8 in “Trivial patches”
  1. 0/4 Trivial patchesFelipe Contreras, May 30, 2013
  2. 1/4 read-cache: fix wrong 'the_index' usageFelipe Contreras, May 30, 2013
  3. Junio C HamanoJun 3, 2013
  4. 2/4 read-cache: trivial style cleanupsFelipe Contreras, May 30, 2013
  5. 3/4 unpack-trees: trivial cleanupFelipe Contreras, May 30, 2013
  6. Junio C HamanoJun 3, 2013
  7. Felipe ContrerasJun 3, 2013
  8. 4/4 sha1_file: trivial style cleanupFelipe Contreras, May 30, 2013

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.