]> git.ipfire.org Git - thirdparty/git.git/commit - dir.c
untracked cache: invalidate dirs recursively if .gitignore changes
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Sun, 8 Mar 2015 10:12:27 +0000 (17:12 +0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 12 Mar 2015 20:45:15 +0000 (13:45 -0700)
commit5ebf79ad4b308c678bd9623dd906c01bb0ab7e0f
tree89402f5f857bf8b3a04d06f2b5bd76ed412584ef
parentccad261f07900b55029f3fd42a9ec8f17229808f
untracked cache: invalidate dirs recursively if .gitignore changes

It's easy to see that if an existing .gitignore changes, its SHA-1
would be different and invalidate_gitignore() is called.

If .gitignore is removed, add_excludes() will treat it like an empty
.gitignore, which again should invalidate the cached directory data.

if .gitignore is added, lookup_untracked() already fills initial
.gitignore SHA-1 as "empty file", so again invalidate_gitignore() is
called.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
dir.c