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

Re: [RFH] two and half potential fixlets to the in-core index handling

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 23, 2008, 19:21 UTC
Message-ID
<7vwsi7y1tp.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<7v1w0fzgpc.fsf@gitster.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 17 quoted lines
> Linus Torvalds <torvalds@linux-foundation.org> writes:
>
>> On Sat, 23 Aug 2008, Junio C Hamano wrote:
>>> 
>>> A hacky solution I have in the attached patch is to waste an xmalloc(1)
>>> and store it there when o->result is created, and also make
>>> read_from_index() pay attention to the cache_nr and the cache_changed
>>> bit. I think it is the safest and minimum fix.
>>
>> Hmm. Wouldn't it be nicer to just add another bit to istate? We have the 
>> space already, since we already have a bitfield there, with just one bit 
>> used?
>
> cache_changed can also become a single-bit field.
>
> The oldest "the_index" users work from it in the BSS initialized all
> zero.  We'd also need to mark it as initialized, wouldn't we?

Ah, sorry, even they start with read_cache() to read .git/index (which may not exist yet, which is fine).

Sorry for a stupid thinko.
Previous: Junio C Hamano
Message 22 of 22 in “[bug] git `next' does not do trivial merges”
  1. Paolo BonziniAug 22, 2008
  2. Jeff KingAug 22, 2008
  3. Miklos VajnaAug 23, 2008
  4. Fix in-index merge.Miklos Vajna, Aug 23, 2008
  5. builtin-merge: fail properly when we are in the middle of a conflicted mergeMiklos Vajna, Aug 23, 2008
  6. Junio C HamanoAug 23, 2008
  7. builtin-merge: fail properly when we are in the middle of a conflicted mergeMiklos Vajna, Aug 23, 2008
  8. Junio C HamanoAug 23, 2008
  9. 1/2 merge: fix numerus bugs around "trivial merge" areaJunio C Hamano, Aug 23, 2008
  10. Junio C HamanoAug 24, 2008
  11. builtin-merge: avoid run_command_v_opt() for recursive and subtreeMiklos Vajna, Aug 28, 2008
  12. 2/2 unpack_trees(): protect the handcrafted in-core index from read_cache()Junio C Hamano, Aug 23, 2008
  13. Junio C HamanoAug 23, 2008
  14. Junio C HamanoAug 23, 2008
  15. Fix in-index merge.Miklos Vajna, Aug 23, 2008
  16. Paolo BonziniAug 23, 2008
  17. Junio C HamanoAug 23, 2008
  18. Junio C HamanoAug 23, 2008
  19. [RFH] two and half potential fixlets to the in-core index handlingJunio C Hamano, Aug 23, 2008
  20. Linus TorvaldsAug 23, 2008
  21. Junio C HamanoAug 23, 2008
  22. Junio C HamanoAug 23, 2008

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.