Merge branch 'bc/hash-independent-tests-part-4'
[gitweb.git] / builtin / rm.c
index 90cbe896c99188130a36a18aa18a57cd080be591..19ce95a901bcb086fc4a17c793a0c239c5adfcc2 100644 (file)
@@ -61,7 +61,7 @@ static void print_error_files(struct string_list *files_list,
        }
 }
 
-static void submodules_absorb_gitdir_if_needed(const char *prefix)
+static void submodules_absorb_gitdir_if_needed(void)
 {
        int i;
        for (i = 0; i < list.nr; i++) {
@@ -83,7 +83,7 @@ static void submodules_absorb_gitdir_if_needed(const char *prefix)
                        continue;
 
                if (!submodule_uses_gitfile(name))
-                       absorb_git_dir_into_superproject(prefix, name,
+                       absorb_git_dir_into_superproject(name,
                                ABSORB_GITDIR_RECURSE_SUBMODULES);
        }
 }
@@ -179,7 +179,7 @@ static int check_local_mod(struct object_id *head, int index_only)
                 * way as changed from the HEAD.
                 */
                if (no_head
-                    || get_tree_entry(head, name, &oid, &mode)
+                    || get_tree_entry(the_repository, head, name, &oid, &mode)
                     || ce->ce_mode != create_ce_mode(mode)
                     || !oideq(&ce->oid, &oid))
                        staged_changes = 1;
@@ -273,7 +273,7 @@ int cmd_rm(int argc, const char **argv, const char *prefix)
        parse_pathspec(&pathspec, 0,
                       PATHSPEC_PREFER_CWD,
                       prefix, argv);
-       refresh_index(&the_index, REFRESH_QUIET, &pathspec, NULL, NULL);
+       refresh_index(&the_index, REFRESH_QUIET|REFRESH_UNMERGED, &pathspec, NULL, NULL);
 
        seen = xcalloc(pathspec.nr, 1);
 
@@ -313,7 +313,7 @@ int cmd_rm(int argc, const char **argv, const char *prefix)
        }
 
        if (!index_only)
-               submodules_absorb_gitdir_if_needed(prefix);
+               submodules_absorb_gitdir_if_needed();
 
        /*
         * If not forced, the file, the index and the HEAD (if exists)