From: Junio C Hamano Date: Fri, 31 Jul 2009 16:55:26 GMT Subject: Re: [PATCH 3/5] gitignore: read from index if .gitignore is not in worktree Message-ID: <7vhbwsssg1.fsf@alter.siamese.dyndns.org> In-Reply-To: <1248850154-5469-4-git-send-email-pclouds@gmail.com> Nguyễn Thái Ngọc Duy writes: > this allows to use .gitignore in sparse mode, where .gitignore may or > may not be checked out (CE_VALID) Hmm, do we have a guarantee that we have read the index when .gitignore is used in all the codepath in the current codebase? "git add" used to do the fill_directory() traversal before reading the index in some cases back in v1.6.0 days for a reason. "git add" does not do so anymore, but I am wondering if there are others.