Clean up outstanding object_id transforms.
[gitweb.git] / builtin / update-index.c
index 24fdadfa4b949108677268b9912f3970960138cc..ebfc09faa0d604218af8f5815af5e5fee5915158 100644 (file)
@@ -125,12 +125,16 @@ static int test_if_untracked_cache_is_supported(void)
        struct stat st;
        struct stat_data base;
        int fd, ret = 0;
+       char *cwd;
 
        strbuf_addstr(&mtime_dir, "mtime-test-XXXXXX");
        if (!mkdtemp(mtime_dir.buf))
                die_errno("Could not make temporary directory");
 
-       fprintf(stderr, _("Testing mtime in '%s' "), xgetcwd());
+       cwd = xgetcwd();
+       fprintf(stderr, _("Testing mtime in '%s' "), cwd);
+       free(cwd);
+
        atexit(remove_test_directory);
        xstat_mtime_dir(&st);
        fill_stat_data(&base, &st);
@@ -1099,12 +1103,21 @@ int cmd_update_index(int argc, const char **argv, const char *prefix)
        }
 
        if (split_index > 0) {
+               if (git_config_get_split_index() == 0)
+                       warning(_("core.splitIndex is set to false; "
+                                 "remove or change it, if you really want to "
+                                 "enable split index"));
                if (the_index.split_index)
                        the_index.cache_changed |= SPLIT_INDEX_ORDERED;
                else
                        add_split_index(&the_index);
-       } else if (!split_index)
+       } else if (!split_index) {
+               if (git_config_get_split_index() == 1)
+                       warning(_("core.splitIndex is set to true; "
+                                 "remove or change it, if you really want to "
+                                 "disable split index"));
                remove_split_index(&the_index);
+       }
 
        switch (untracked_cache) {
        case UC_UNSPECIFIED: