grep: fix grepping for "intent to add" files
[gitweb.git] / builtin / rm.c
index d8a9c86dd135e62583f4aeeb3885012da385960a..74a7a43efb9a119b342dde25db12902fdaf0e461 100644 (file)
@@ -14,7 +14,7 @@
 #include "pathspec.h"
 
 static const char * const builtin_rm_usage[] = {
-       N_("git rm [options] [--] <file>..."),
+       N_("git rm [<options>] [--] <file>..."),
        NULL
 };
 
@@ -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) {