sequencer: introduce todo_list_write_to_file()
[gitweb.git] / builtin / rm.c
index 0fcb952e9b1dd8a40c62c4bd2f8538a03e00b0f7..17086d3d97c536522720c589ea8f35d366536ea8 100644 (file)
@@ -178,9 +178,9 @@ 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->hash, name, oid.hash, &mode)
+                    || get_tree_entry(head, name, &oid, &mode)
                     || ce->ce_mode != create_ce_mode(mode)
-                    || oidcmp(&ce->oid, &oid))
+                    || !oideq(&ce->oid, &oid))
                        staged_changes = 1;
 
                /*
@@ -278,14 +278,14 @@ int cmd_rm(int argc, const char **argv, const char *prefix)
 
        for (i = 0; i < active_nr; i++) {
                const struct cache_entry *ce = active_cache[i];
-               if (!ce_path_match(ce, &pathspec, seen))
+               if (!ce_path_match(&the_index, ce, &pathspec, seen))
                        continue;
                ALLOC_GROW(list.entry, list.nr + 1, list.alloc);
                list.entry[list.nr].name = xstrdup(ce->name);
                list.entry[list.nr].is_submodule = S_ISGITLINK(ce->ce_mode);
                if (list.entry[list.nr++].is_submodule &&
                    !is_staging_gitmodules_ok(&the_index))
-                       die (_("Please stage your changes to .gitmodules or stash them to proceed"));
+                       die(_("please stage your changes to .gitmodules or stash them to proceed"));
        }
 
        if (pathspec.nr) {