grep: fix grepping for "intent to add" files
[gitweb.git] / builtin / rm.c
index 3304bff42a2fb91f66b9bbca1117746eaa22352a..74a7a43efb9a119b342dde25db12902fdaf0e461 100644 (file)
@@ -212,7 +212,7 @@ static int check_local_mod(unsigned char *head, int index_only)
                 * "intent to add" entry.
                 */
                if (local_changes && staged_changes) {
-                       if (!index_only || !(ce->ce_flags & CE_INTENT_TO_ADD))
+                       if (!index_only || !ce_intent_to_add(ce))
                                string_list_append(&files_staged, name);
                }
                else if (!index_only) {