diff options
author | Junio C Hamano <gitster@pobox.com> | 2023-06-30 02:43:20 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-06-30 02:43:21 +0300 |
commit | a1264a08a1a6e0cd7e510c899cd0ba42dcf1045d (patch) | |
tree | d6a22be96e39e1284d9838ce5e8ad58941c5099b /builtin/commit.c | |
parent | b2166b0d496c2f3df96929da300039a01227e719 (diff) | |
parent | 68d686460f58e45f2eb080e0cdf314987eca5ce5 (diff) |
Merge branch 'en/header-split-cache-h-part-3'
Header files cleanup.
* 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
...
Diffstat (limited to 'builtin/commit.c')
-rw-r--r-- | builtin/commit.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/builtin/commit.c b/builtin/commit.c index 65a5c0e29d..a9e8c62c85 100644 --- a/builtin/commit.c +++ b/builtin/commit.c @@ -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)) |