Merge branch 'jc/gitignore-ends-with-slash'

* jc/gitignore-ends-with-slash:
  gitignore: lazily find dtype
  gitignore(5): Allow "foo/" in ignore list to match directory "foo"
This commit is contained in:
Junio C Hamano
2008-02-16 17:57:06 -08:00
7 changed files with 106 additions and 15 deletions

View File

@ -521,8 +521,9 @@ static void verify_absent(struct cache_entry *ce, const char *action,
if (!lstat(ce->name, &st)) {
int cnt;
int dtype = ce_to_dtype(ce);
if (o->dir && excluded(o->dir, ce->name))
if (o->dir && excluded(o->dir, ce->name, &dtype))
/*
* ce->name is explicitly excluded, so it is Ok to
* overwrite it.