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 12:30:42 -0700 |
| commit | f59aa5e0a93242f73bf21e241fabe0c261f4b62a (patch) | |
| tree | 11b227b0b15fc34103be2c545501a22c904c939b /builtin/rev-parse.c | |
| parent | t/helper: stop using `the_index` (diff) | |
| download | git-f59aa5e0a93242f73bf21e241fabe0c261f4b62a.tar.gz 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/rev-parse.c')
| -rw-r--r-- | builtin/rev-parse.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/rev-parse.c b/builtin/rev-parse.c index 624182e507..af79538632 100644 --- a/builtin/rev-parse.c +++ b/builtin/rev-parse.c @@ -3,7 +3,7 @@ * * Copyright (C) Linus Torvalds, 2005 */ -#define USE_THE_INDEX_VARIABLE + #include "builtin.h" #include "abspath.h" #include "config.h" @@ -1049,8 +1049,8 @@ int cmd_rev_parse(int argc, const char **argv, const char *prefix) if (!strcmp(arg, "--shared-index-path")) { if (repo_read_index(the_repository) < 0) die(_("Could not read the index")); - if (the_index.split_index) { - const struct object_id *oid = &the_index.split_index->base_oid; + if (the_repository->index->split_index) { + const struct object_id *oid = &the_repository->index->split_index->base_oid; const char *path = git_path("sharedindex.%s", oid_to_hex(oid)); print_path(path, prefix, format, DEFAULT_RELATIVE); } |
