ls-remote: create '--sort' option
[gitweb.git] / builtin / rm.c
index a818efe230a0667b9e3e5f03efbb11b1db1df273..4447bb4d0faf8c34f3fc96361a651eaad396d6d4 100644 (file)
@@ -385,10 +385,9 @@ int cmd_rm(int argc, const char **argv, const char *prefix)
                        stage_updated_gitmodules(&the_index);
        }
 
-       if (active_cache_changed) {
-               if (write_locked_index(&the_index, &lock_file, COMMIT_LOCK))
-                       die(_("Unable to write new index file"));
-       }
+       if (write_locked_index(&the_index, &lock_file,
+                              COMMIT_LOCK | SKIP_IF_UNCHANGED))
+               die(_("Unable to write new index file"));
 
        return 0;
 }