diff options
Diffstat (limited to 'builtin-rm.c')
-rw-r--r-- | builtin-rm.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin-rm.c b/builtin-rm.c index e06640cf8d..b7126e3e25 100644 --- a/builtin-rm.c +++ b/builtin-rm.c @@ -79,7 +79,8 @@ static int check_local_mod(unsigned char *head, int index_only) || hashcmp(ce->sha1, sha1)) staged_changes = 1; - if (local_changes && staged_changes) + if (local_changes && staged_changes && + !(index_only && is_empty_blob_sha1(ce->sha1))) errs = error("'%s' has staged content different " "from both the file and the HEAD\n" "(use -f to force removal)", name); |