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

Re: [PATCH v4 12/14] fix 'git update-index --verbose --again' output

From
Karsten Blees <karsten.blees@gmail.com>
Date
Nov 8, 2013, 10:27 UTC
Message-ID
<527CBC92.5000306@gmail.com>
In-Reply-To
<xmqqiow3q2sh.fsf@gitster.dls.corp.google.com>
Am 07.11.2013 23:12, schrieb Junio C Hamano:
Show 12 quoted lines
> Karsten Blees <karsten.blees@gmail.com> writes:
> 
>> 'git update-index --verbose' consistently reports paths relative to the
>> work-tree root. The only exception is the '--again' option, which reports
>> paths relative to the current working directory.
>>
>> Change do_reupdate to use non-prefixed paths.
> 
> Interesting.
> 
> This looks like a genuine fix unrelated to the use of the new hashmap.
> 
Indeed, #13 as well (and #4, #5, for that matter). I stumbled across this when analysing Thomas' last valgrind report.
Note that #12, #13 are prequels to #14, which adds a "char *path = xstrdup(ce->name); ... free(path)" around the update_one call.
Show 19 quoted lines
>>
>> Signed-off-by: Karsten Blees <blees@dcon.de>
>> ---
>>  builtin/update-index.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/builtin/update-index.c b/builtin/update-index.c
>> index e3a10d7..d180d80 100644
>> --- a/builtin/update-index.c
>> +++ b/builtin/update-index.c
>> @@ -579,7 +579,7 @@ static int do_reupdate(int ac, const char **av,
>>  		 * or worse yet 'allow_replace', active_nr may decrease.
>>  		 */
>>  		save_nr = active_nr;
>> -		update_one(ce->name + prefix_length, prefix, prefix_length);
>> +		update_one(ce->name, NULL, 0);
>>  		if (save_nr != active_nr)
>>  			goto redo;
>>  	}
Previous: Junio C HamanoNext: Karsten Blees
Message 21 of 26 in “New hash table implementation”
  1. 00/14 New hash table implementationKarsten Blees, Nov 7, 2013
  2. 01/14 submodule: don't access the .gitmodules cache entry after removing itKarsten Blees, Nov 7, 2013
  3. Heiko VoigtNov 7, 2013
  4. 02/14 add a hashtable implementation that supports O(1) removalKarsten Blees, Nov 7, 2013
  5. Junio C HamanoNov 7, 2013
  6. Karsten BleesNov 8, 2013
  7. Philip OakleyNov 8, 2013
  8. Junio C HamanoNov 8, 2013
  9. Karsten BleesNov 13, 2013
  10. 03/14 buitin/describe.c: use new hash map implementationKarsten Blees, Nov 7, 2013
  11. 04/14 diffcore-rename.c: move code around to prepare for the next patchKarsten Blees, Nov 7, 2013
  12. 05/14 diffcore-rename.c: simplify finding exact renamesKarsten Blees, Nov 7, 2013
  13. 06/14 diffcore-rename.c: use new hash map implementationKarsten Blees, Nov 7, 2013
  14. 07/14 name-hash.c: use new hash map implementation for directoriesKarsten Blees, Nov 7, 2013
  15. 08/14 name-hash.c: remove unreferenced directory entriesKarsten Blees, Nov 7, 2013
  16. 09/14 name-hash.c: use new hash map implementation for cache entriesKarsten Blees, Nov 7, 2013
  17. 10/14 name-hash.c: remove cache entries instead of marking them CE_UNHASHEDKarsten Blees, Nov 7, 2013
  18. 11/14 remove old hash.[ch] implementationKarsten Blees, Nov 7, 2013
  19. 12/14 fix 'git update-index --verbose --again' outputKarsten Blees, Nov 7, 2013
  20. Junio C HamanoNov 7, 2013
  21. Karsten BleesNov 8, 2013
  22. 13/14 builtin/update-index.c: cleanup update_oneKarsten Blees, Nov 7, 2013
  23. Junio C HamanoNov 7, 2013
  24. Karsten BleesNov 8, 2013
  25. 14/14 read-cache.c: fix memory leaks caused by removed cache entriesKarsten Blees, Nov 7, 2013
  26. Junio C HamanoNov 7, 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.