]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/reset.c
cache.h: flip NO_THE_INDEX_COMPATIBILITY_MACROS switch
[thirdparty/git.git] / builtin / reset.c
index 58166964f84ce1b78f703bb10f92f713b2cce6b4..4d18a461fab631dd752adec3b95197a3a2657a62 100644 (file)
@@ -7,6 +7,7 @@
  *
  * Copyright (c) 2005, 2006 Linus Torvalds and Junio C Hamano
  */
+#define USE_THE_INDEX_COMPATIBILITY_MACROS
 #include "builtin.h"
 #include "config.h"
 #include "lockfile.h"
@@ -95,7 +96,7 @@ static int reset_index(const struct object_id *oid, int reset_type, int quiet)
 
        if (reset_type == MIXED || reset_type == HARD) {
                tree = parse_tree_indirect(oid);
-               prime_cache_tree(&the_index, tree);
+               prime_cache_tree(the_repository, the_repository->index, tree);
        }
 
        ret = 0;
@@ -413,7 +414,7 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
                        print_new_head_line(lookup_commit_reference(the_repository, &oid));
        }
        if (!pathspec.nr)
-               remove_branch_state();
+               remove_branch_state(the_repository);
 
        return update_ref_status;
 }