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

Re: [PATCH] repository.c: always allocate 'index' at repo init time

From
Jeff King <peff@peff.net>
Date
May 21, 2019, 20:58 UTC
Message-ID
<20190521205806.GA14807@sigill.intra.peff.net>
In-Reply-To
<CACsJy8CoauTdJ1huU=w2YNbw53iea5U304yAu2oCUuTvFRaV7w@mail.gmail.com>
On Tue, May 21, 2019 at 05:34:02PM +0700, Duy Nguyen wrote:
Show 8 quoted lines
> >   2. There are hundreds of spots that need to swap out "repo->index" for
> >      "&repo->index". In the patch below I just did enough to compile
> >      archive-zip.o, to illustrate. :)
> 
> You are more thorough than me. I saw #2 first and immediately backed
> off (partly for a selfish reason: I have plenty of the_repo conversion
> patches in queue and anything touching "repo" may delay those patches
> even more).
Yeah, that's true, it would be disruptive.
Show 5 quoted lines
> There's also #3 but this one is minor. So far 'struct repo' is more of
> a glue of things. Embedding index_state in it while leaving
> object_store, ref_store... pointers feels inconsistent and a bit
> weird. It's not a strong reason for making index_state a pointer too,
> but if we have to deal with pointers anyway...

And yeah, I agree it would nice for it to all be consistent. Let's leave it at your patch for now, and we can think about refactoring this later.

-Peff
Previous: Duy NguyenNext: Junio C Hamano
Message 15 of 16 in “new segfault in master (6a6c0f10a70a6eb1)”
  1. Eric WongMay 11, 2019
  2. Jeff KingMay 11, 2019
  3. Jeff KingMay 11, 2019
  4. Duy NguyenMay 12, 2019
  5. get_oid: handle NULL repo->indexJeff King, May 14, 2019
  6. Eric WongMay 14, 2019
  7. Duy NguyenMay 15, 2019
  8. Jeff KingMay 15, 2019
  9. Junio C HamanoMay 15, 2019
  10. Duy NguyenMay 15, 2019
  11. Junio C HamanoMay 16, 2019
  12. repository.c: always allocate 'index' at repo init timeNguyễn Thái Ngọc Duy, May 19, 2019
  13. Jeff KingMay 20, 2019
  14. Duy NguyenMay 21, 2019
  15. Jeff KingMay 21, 2019
  16. Junio C HamanoMay 28, 2019

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.