diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-05-08 10:18:44 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-05-08 10:18:44 -0700 |
| commit | f526a4f3142de772bdd2d0dbd4710e401f603a5c (patch) | |
| tree | ba224ae569501c086acff8e8db3896aefa56fd3d /builtin/diff.c | |
| parent | c5c9acf77d9bced87c758e8c8aba13a438d34802 (diff) | |
| parent | 0c473557908ec626e9e8abf66d2f2308624cdd14 (diff) | |
| download | git-f526a4f3142de772bdd2d0dbd4710e401f603a5c.tar.xz | |
Merge branch 'ps/the-index-is-no-more'
The singleton index_state instance "the_index" has been eliminated
by always instantiating "the_repository" and replacing references
to "the_index" with references to its .index member.
* ps/the-index-is-no-more:
repository: drop `initialize_the_repository()`
repository: drop `the_index` variable
builtin/clone: stop using `the_index`
repository: initialize index in `repo_init()`
builtin: stop using `the_index`
t/helper: stop using `the_index`
Diffstat (limited to 'builtin/diff.c')
| -rw-r--r-- | builtin/diff.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/diff.c b/builtin/diff.c index 6e196e0c7d..efc37483b3 100644 --- a/builtin/diff.c +++ b/builtin/diff.c @@ -3,7 +3,7 @@ * * Copyright (c) 2006 Junio C Hamano */ -#define USE_THE_INDEX_VARIABLE + #include "builtin.h" #include "config.h" #include "ewah/ewok.h" @@ -239,9 +239,9 @@ static void refresh_index_quietly(void) fd = repo_hold_locked_index(the_repository, &lock_file, 0); if (fd < 0) return; - discard_index(&the_index); + discard_index(the_repository->index); repo_read_index(the_repository); - refresh_index(&the_index, REFRESH_QUIET|REFRESH_UNMERGED, NULL, NULL, + refresh_index(the_repository->index, REFRESH_QUIET|REFRESH_UNMERGED, NULL, NULL, NULL); repo_update_index_if_able(the_repository, &lock_file); } |
