diff --git a/builtin/repack.c b/builtin/repack.c index c4360382c1..ab4471f740 100644 --- a/builtin/repack.c +++ b/builtin/repack.c @@ -378,8 +378,8 @@ int cmd_repack(int argc, for (i = 0; i < istate->cache_nr; i++) { const struct cache_entry *ce = istate->cache[i]; - if (oidset_contains(&drop_oids, &ce->oid)) - die(_("cannot drop '%s' (%s): it is referenced by the current index"), + if (oidset_remove(&drop_oids, &ce->oid)) + warning(_("cannot drop '%s' (%s): it is referenced by the current index"), ce->name, oid_to_hex(&ce->oid)); } }