Merge branch 'en/header-split-cache-h-part-3' into next

Header files cleanup.

Kicked out of 'next', applied build fixes including js/cmake-wo-cache-h

* en/header-split-cache-h-part-3: (28 commits)
  fsmonitor-ll.h: split this header out of fsmonitor.h
  hash-ll, hashmap: move oidhash() to hash-ll
  object-store-ll.h: split this header out of object-store.h
  khash: name the structs that khash declares
  merge-ll: rename from ll-merge
  git-compat-util.h: remove unneccessary include of wildmatch.h
  builtin.h: remove unneccessary includes
  list-objects-filter-options.h: remove unneccessary include
  diff.h: remove unnecessary include of oidset.h
  repository: remove unnecessary include of path.h
  log-tree: replace include of revision.h with simple forward declaration
  cache.h: remove this no-longer-used header
  read-cache*.h: move declarations for read-cache.c functions from cache.h
  repository.h: move declaration of the_index from cache.h
  merge.h: move declarations for merge.c from cache.h
  diff.h: move declaration for global in diff.c from cache.h
  preload-index.h: move declarations for preload-index.c from elsewhere
  sparse-index.h: move declarations for sparse-index.c from cache.h
  name-hash.h: move declarations for name-hash.c from cache.h
  run-command.h: move declarations for run-command.c from cache.h
  ...
This commit is contained in:
Junio C Hamano
2023-06-23 11:22:57 -07:00
313 changed files with 2179 additions and 1898 deletions

View File

@ -6,7 +6,7 @@
*/
#define USE_THE_INDEX_VARIABLE
#include "cache.h"
#include "builtin.h"
#include "advice.h"
#include "config.h"
#include "lockfile.h"
@ -15,7 +15,6 @@
#include "dir.h"
#include "editor.h"
#include "environment.h"
#include "builtin.h"
#include "diff.h"
#include "diffcore.h"
#include "commit.h"
@ -30,6 +29,9 @@
#include "utf8.h"
#include "object-name.h"
#include "parse-options.h"
#include "path.h"
#include "preload-index.h"
#include "read-cache.h"
#include "string-list.h"
#include "rerere.h"
#include "unpack-trees.h"
@ -38,6 +40,7 @@
#include "gpg-interface.h"
#include "column.h"
#include "sequencer.h"
#include "sparse-index.h"
#include "mailmap.h"
#include "help.h"
#include "commit-reach.h"
@ -447,7 +450,8 @@ static const char *prepare_index(const char **argv, const char *prefix,
if (all || (also && pathspec.nr)) {
repo_hold_locked_index(the_repository, &index_lock,
LOCK_DIE_ON_ERROR);
add_files_to_cache(also ? prefix : NULL, &pathspec, 0);
add_files_to_cache(the_repository, also ? prefix : NULL,
&pathspec, 0, 0);
refresh_cache_or_die(refresh_flags);
cache_tree_update(&the_index, WRITE_TREE_SILENT);
if (write_locked_index(&the_index, &index_lock, 0))