summaryrefslogtreecommitdiff
path: root/builtin/diff.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-04-18 14:14:14 +0200
committerJunio C Hamano <gitster@pobox.com>2024-04-18 12:30:42 -0700
commitf59aa5e0a93242f73bf21e241fabe0c261f4b62a (patch)
tree11b227b0b15fc34103be2c545501a22c904c939b /builtin/diff.c
parent319ba144076c27f3451bb73834839e9441a9c180 (diff)
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/diff.c')
-rw-r--r--builtin/diff.c6
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);
}