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

[RFC 00/14] convert dir.c to take an index parameter

From
BWBrandon Williams <bmwill@google.com>
Date
May 5, 2017, 19:53 UTC
Message-ID
<20170505195334.121856-1-bmwill@google.com>

One of the things brought up on the list in the past few days has been migrating away from using the index compatibility macros. One of the issues brought up in that thread was how simply doing that conversion doesn't eliminate the reliance on global state (specifically the_index). If one day we want to have a 'repository object' passed around then we first need to convert different subsystems to be prepared to handle that. This series provides a first step, converting the code in dir.c to take a 'struct index_state' and using that instead of implicitly using 'the_index'.

Brandon Williams (14):
  dir: stop using the index compatibility macros
  dir: convert read_skip_worktree_file_from_index to take an index
  dir: convert directory_exists_in_index to take index
  dir: convert get_dtype to take index
  dir: convert dir_add* to take an index
  dir: convert last_exclude_matching_from_list to take an index
  dir: convert is_excluded_from_list to take an index
  dir: convert add_excludes to take an index
  dir: convert prep_exclude to take an index
  dir: convert is_excluded to take an index
  dir: convert open_cached_dir to take an index
  dir: convert read_directory_recursive to take an index
  dir: convert read_directory to take an index
  dir: convert fill_directory to take an index
 builtin/add.c          |   7 +-
 builtin/check-ignore.c |   3 +-
 builtin/clean.c        |   4 +-
 builtin/grep.c         |   2 +-
 builtin/ls-files.c     |   4 +-
 dir.c                  | 200 ++++++++++++++++++++++++++++---------------------
 dir.h                  |  27 +++++--
 unpack-trees.c         |  10 +--
 wt-status.c            |   2 +-
 9 files changed, 151 insertions(+), 108 deletions(-)
-- 
2.13.0.rc1.294.g07d810a77f-goog
Next: Brandon Williams
Message 1 of 18 in “[RFC 00/14] convert dir.c to take an index parameter”
  1. Brandon WilliamsMay 5, 2017
  2. 01/14 dir: stop using the index compatibility macrosBrandon Williams, May 5, 2017
  3. 02/14 dir: convert read_skip_worktree_file_from_index to take an indexBrandon Williams, May 5, 2017
  4. 04/14 dir: convert get_dtype to take indexBrandon Williams, May 5, 2017
  5. 05/14 dir: convert dir_add* to take an indexBrandon Williams, May 5, 2017
  6. 06/14 dir: convert last_exclude_matching_from_list to take an indexBrandon Williams, May 5, 2017
  7. 07/14 dir: convert is_excluded_from_list to take an indexBrandon Williams, May 5, 2017
  8. 12/14 dir: convert read_directory_recursive to take an indexBrandon Williams, May 5, 2017
  9. 14/14 dir: convert fill_directory to take an indexBrandon Williams, May 5, 2017
  10. 13/14 dir: convert read_directory to take an indexBrandon Williams, May 5, 2017
  11. 10/14 dir: convert is_excluded to take an indexBrandon Williams, May 5, 2017
  12. 11/14 dir: convert open_cached_dir to take an indexBrandon Williams, May 5, 2017
  13. 08/14 dir: convert add_excludes to take an indexBrandon Williams, May 5, 2017
  14. 03/14 dir: convert directory_exists_in_index to take indexBrandon Williams, May 5, 2017
  15. 09/14 dir: convert prep_exclude to take an indexBrandon Williams, May 5, 2017
  16. Junio C HamanoMay 6, 2017
  17. Brandon WilliamsMay 8, 2017
  18. Jeff HostetlerMay 8, 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.