summaryrefslogtreecommitdiff
path: root/builtin/rm.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/rm.c')
-rw-r--r--builtin/rm.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/builtin/rm.c b/builtin/rm.c
index a818efe..4447bb4 100644
--- a/builtin/rm.c
+++ b/builtin/rm.c
@@ -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;
}