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

Re: [PATCH 0/5] Start of a journey: drop NO_THE_INDEX_COMPATIBILITY_MACROS

From
BWBrandon Williams <bmwill@google.com>
Date
May 5, 2017, 17:20 UTC
Message-ID
<20170505172049.GA55152@google.com>
In-Reply-To
<alpine.DEB.2.21.1.1705051244310.146734@virtualbox>
On 05/05, Johannes Schindelin wrote:
Show 26 quoted lines
> Hi Stefan & Junio,
> 
> On Thu, 4 May 2017, Stefan Beller wrote:
> 
> > So instead of a mechanical replacement, we'd rather want to
> > see "the_index" not appearing at all outside of builtins, which
> > implies two things:
> >
> > * If done properly we can move the macros from cache.h to
> >   e.g. builtin.h. That way future developers are less tempted
> >   to use the cache_* macros in the library code.
> 
> Yessss!
> 
> > * we'd have to pass through the_index from the builtin function
> >   down to the library code, potentially going through multiple
> >   function. For this it is unclear if we want to start this now, or wait
> >   until Brandon presents his initial repository object struct, which
> >   may be suited better for passing-around.
> 
> Or the other way round. I guess passing a struct index_state can be a
> first step, and we can later convert it to struct repository. I fathom
> that more places will need a struct repository parameter than a struct
> index_state parameter. That is, if you first identify all the places where
> the index_state parameter is required, it should make the struct
> repository change easier.

Exactly this. I have a local series which converts ls-files to use a repository struct but it turns out, for that to work, dir.c needs to be converted to take in an index_state struct for fill_directory(). So I then started working on doing that conversion and hopefully will have something clean enough to send out later today for people to comment on.

-- 
Brandon Williams
Previous: Johannes SchindelinNext: Jonathan Nieder
Message 20 of 25 in “Start of a journey: drop NO_THE_INDEX_COMPATIBILITY_MACROS”
  1. 0/5 Start of a journey: drop NO_THE_INDEX_COMPATIBILITY_MACROSStefan Beller, May 1, 2017
  2. 1/5 cache.h: drop read_cache()Stefan Beller, May 1, 2017
  3. 2/5 cache.h: drop active_* macrosStefan Beller, May 1, 2017
  4. 3/5 cache.h: drop read_cache_fromStefan Beller, May 1, 2017
  5. 4/5 cache.h: drop read_cache_preload(pathspec)Stefan Beller, May 1, 2017
  6. 5/5 cache.h: drop read_cache_unmerged()Stefan Beller, May 1, 2017
  7. Junio C HamanoMay 2, 2017
  8. Stefan BellerMay 2, 2017
  9. Jeff HostetlerMay 2, 2017
  10. Samuel LijinMay 3, 2017
  11. Stefan BellerMay 3, 2017
  12. Samuel LijinMay 3, 2017
  13. Brandon WilliamsMay 4, 2017
  14. Duy NguyenMay 3, 2017
  15. Stefan BellerMay 3, 2017
  16. Junio C HamanoMay 4, 2017
  17. Brandon WilliamsMay 4, 2017
  18. Stefan BellerMay 4, 2017
  19. Johannes SchindelinMay 5, 2017
  20. Brandon WilliamsMay 5, 2017
  21. Jonathan NiederMay 4, 2017
  22. Junio C HamanoMay 5, 2017
  23. Brandon WilliamsMay 5, 2017
  24. Jeff HostetlerMay 2, 2017
  25. Stefan BellerMay 2, 2017

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.