]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/write-tree.c
The fifth batch
[thirdparty/git.git] / builtin / write-tree.c
index 66e83d0ecba04c90d1e12a2529cc40210808035c..8c75b4609b5692d3c41836793d4cad878219a2ac 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (C) Linus Torvalds, 2005
  */
-#define USE_THE_INDEX_VARIABLE
+
 #include "builtin.h"
 #include "config.h"
 #include "environment.h"
@@ -44,8 +44,8 @@ int cmd_write_tree(int argc, const char **argv, const char *cmd_prefix)
        prepare_repo_settings(the_repository);
        the_repository->settings.command_requires_full_index = 0;
 
-       ret = write_index_as_tree(&oid, &the_index, get_index_file(), flags,
-                                 tree_prefix);
+       ret = write_index_as_tree(&oid, the_repository->index, get_index_file(),
+                                 flags, tree_prefix);
        switch (ret) {
        case 0:
                printf("%s\n", oid_to_hex(&oid));