name-rev: refactor logic to see if a new candidate is a better name
[gitweb.git] / builtin / update-index.c
index 24fdadfa4b949108677268b9912f3970960138cc..d74d72cc7fad93980abd409d2c9dc10ae4652fd3 100644 (file)
@@ -1099,12 +1099,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: