sha1-name.c: remove implicit dependency on the_index
[gitweb.git] / builtin / commit.c
index 004b816635bf1628bfe7697f737a22cbcd27622b..d3f1234bf058d9c4ab4c1ad610cec580cc7f1250 100644 (file)
@@ -1367,7 +1367,7 @@ int cmd_status(int argc, const char **argv, const char *prefix)
        if (status_format != STATUS_FORMAT_PORCELAIN &&
            status_format != STATUS_FORMAT_PORCELAIN_V2)
                progress_flag = REFRESH_PROGRESS;
-       read_index(&the_index);
+       repo_read_index(the_repository);
        refresh_index(&the_index,
                      REFRESH_QUIET|REFRESH_UNMERGED|progress_flag,
                      &s.pathspec, NULL, NULL);
@@ -1396,7 +1396,7 @@ int cmd_status(int argc, const char **argv, const char *prefix)
        wt_status_collect(&s);
 
        if (0 <= fd)
-               update_index_if_able(&the_index, &index_lock);
+               repo_update_index_if_able(the_repository, &index_lock);
 
        if (s.relative_paths)
                s.prefix = prefix;
@@ -1674,7 +1674,7 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
        run_command_v_opt(argv_gc_auto, RUN_GIT_CMD);
        run_commit_hook(use_editor, get_index_file(), "post-commit", NULL);
        if (amend && !no_post_rewrite) {
-               commit_post_rewrite(current_head, &oid);
+               commit_post_rewrite(the_repository, current_head, &oid);
        }
        if (!quiet) {
                unsigned int flags = 0;