diff options
Diffstat (limited to 'builtin/describe.c')
-rw-r--r-- | builtin/describe.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/builtin/describe.c b/builtin/describe.c index 23e3f05fb1..eea1e330c0 100644 --- a/builtin/describe.c +++ b/builtin/describe.c @@ -1,4 +1,4 @@ -#define USE_THE_INDEX_COMPATIBILITY_MACROS +#define USE_THE_INDEX_VARIABLE #include "cache.h" #include "config.h" #include "lockfile.h" @@ -653,10 +653,11 @@ int cmd_describe(int argc, const char **argv, const char *prefix) int fd, result; setup_work_tree(); - read_cache(); + repo_read_index(the_repository); refresh_index(&the_index, REFRESH_QUIET|REFRESH_UNMERGED, NULL, NULL, NULL); - fd = hold_locked_index(&index_lock, 0); + fd = repo_hold_locked_index(the_repository, + &index_lock, 0); if (0 <= fd) repo_update_index_if_able(the_repository, &index_lock); |