diff options
Diffstat (limited to 'builtin/update-index.c')
| -rw-r--r-- | builtin/update-index.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/builtin/update-index.c b/builtin/update-index.c index 35a1f957ad..45b4a8b555 100644 --- a/builtin/update-index.c +++ b/builtin/update-index.c @@ -3,7 +3,7 @@ * * Copyright (C) Linus Torvalds, 2005 */ - +#define USE_THE_REPOSITORY_VARIABLE #include "builtin.h" #include "bulk-checkin.h" #include "config.h" @@ -22,7 +22,6 @@ #include "pathspec.h" #include "dir.h" #include "read-cache.h" -#include "repository.h" #include "setup.h" #include "sparse-index.h" #include "split-index.h" @@ -917,7 +916,10 @@ static enum parse_opt_result reupdate_callback( return 0; } -int cmd_update_index(int argc, const char **argv, const char *prefix) +int cmd_update_index(int argc, + const char **argv, + const char *prefix, + struct repository *repo UNUSED) { int newfd, entries, has_errors = 0, nul_term_line = 0; enum uc_mode untracked_cache = UC_UNSPECIFIED; @@ -1194,7 +1196,7 @@ int cmd_update_index(int argc, const char **argv, const char *prefix) "remove or change it, if you really want to " "enable the untracked cache")); add_untracked_cache(the_repository->index); - report(_("Untracked cache enabled for '%s'"), get_git_work_tree()); + report(_("Untracked cache enabled for '%s'"), repo_get_work_tree(the_repository)); break; default: BUG("bad untracked_cache value: %d", untracked_cache); @@ -1239,7 +1241,7 @@ int cmd_update_index(int argc, const char **argv, const char *prefix) if (newfd < 0) { if (refresh_args.flags & REFRESH_QUIET) exit(128); - unable_to_lock_die(get_index_file(), lock_error); + unable_to_lock_die(repo_get_index_file(the_repository), lock_error); } if (write_locked_index(the_repository->index, &lock_file, COMMIT_LOCK)) die("Unable to write new index file"); |
