diff --git a/builtin-rm.c b/builtin-rm.c
index 3d03da09df0b2831dd5a6bcbc09e75db356260a1..c11f45585825962e61bdee4bdd6df206f0a141c6 100644 (file)
--- a/builtin-rm.c
+++ b/builtin-rm.c
* "intent to add" entry.
*/
if (local_changes && staged_changes) {
- if (!index_only || !is_empty_blob_sha1(ce->sha1))
+ if (!index_only || !(ce->ce_flags & CE_INTENT_TO_ADD))
errs = error("'%s' has staged content different "
"from both the file and the HEAD\n"
"(use -f to force removal)", name);