diff options
author | Patrick Steinhardt <ps@pks.im> | 2024-04-18 14:14:14 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-04-18 21:30:42 +0200 |
commit | f59aa5e0a93242f73bf21e241fabe0c261f4b62a (patch) | |
tree | 11b227b0b15fc34103be2c545501a22c904c939b /builtin/write-tree.c | |
parent | t/helper: stop using `the_index` (diff) | |
download | git-f59aa5e0a93242f73bf21e241fabe0c261f4b62a.tar.xz git-f59aa5e0a93242f73bf21e241fabe0c261f4b62a.zip |
builtin: stop using `the_index`
Convert builtins to use `the_repository->index` instead of `the_index`.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/write-tree.c')
-rw-r--r-- | builtin/write-tree.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/write-tree.c b/builtin/write-tree.c index 66e83d0ecb..8c75b4609b 100644 --- a/builtin/write-tree.c +++ b/builtin/write-tree.c @@ -3,7 +3,7 @@ * * Copyright (C) Linus Torvalds, 2005 */ -#define USE_THE_INDEX_VARIABLE + #include "builtin.h" #include "config.h" #include "environment.h" @@ -44,8 +44,8 @@ int cmd_write_tree(int argc, const char **argv, const char *cmd_prefix) prepare_repo_settings(the_repository); the_repository->settings.command_requires_full_index = 0; - ret = write_index_as_tree(&oid, &the_index, get_index_file(), flags, - tree_prefix); + ret = write_index_as_tree(&oid, the_repository->index, get_index_file(), + flags, tree_prefix); switch (ret) { case 0: printf("%s\n", oid_to_hex(&oid)); |