git-add: warn when adding an ignored file with an explicit request.
We allow otherwise ignored paths to be added to the index by spelling its path out on the command line, but we would warn the user about them when we do so. Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
e23ca9e1f9
commit
1e423f5655
@ -37,6 +37,9 @@ static void prune_directory(struct dir_struct *dir, const char **pathspec, int p
|
|||||||
free(entry);
|
free(entry);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (entry->ignored_entry)
|
||||||
|
fprintf(stderr, "warning: '%s' is an ignored path.\n",
|
||||||
|
entry->name);
|
||||||
*dst++ = entry;
|
*dst++ = entry;
|
||||||
}
|
}
|
||||||
dir->nr = dst - dir->entries;
|
dir->nr = dst - dir->entries;
|
||||||
|
Loading…
Reference in New Issue
Block a user