From: David Turner <dturner@twopensource.com>
To: git mailing list <git@vger.kernel.org>, Duy Nguyen <pclouds@gmail.com>
Subject: Confused about sparse vs untracked-cache
Date: Wed, 29 Jul 2015 22:32:07 -0400 [thread overview]
Message-ID: <1438223527.18134.53.camel@twopensource.com> (raw)
I'm looking at dir.c, and there's a bit I'm confused about:
prep_exclude() says:
/*
* .. and .gitignore does not exist before
* (i.e. null exclude_sha1 and skip_worktree is
* not set). Then we can skip loading .gitignore,
* which would result in ENOENT anyway.
* skip_worktree is taken care in read_directory()
*/
!is_null_sha1(untracked->exclude_sha1))) {
That "skip_worktree is taken care in read_directory()" appears to be
referring to this bit of validate_untracked_cache():
/*
* An optimization in prep_exclude() does not play well with
* CE_SKIP_WORKTREE. It's a rare case anyway, if a single
* entry has that bit set, disable the whole untracked cache.
*/
for (i = 0; i < active_nr; i++)
if (ce_skip_worktree(active_cache[i]))
return NULL;
------------
I'm confused about why skip_worktree needs to be unset. When I comment
out the second snippet, all the tests still pass. What was the reason
behind that condition? Is it really necessary?
next reply other threads:[~2015-07-30 2:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-30 2:32 David Turner [this message]
2015-07-30 14:09 ` Confused about sparse vs untracked-cache Duy Nguyen
2015-07-30 23:30 ` David Turner
2015-07-31 5:13 ` David Turner
2015-07-31 11:28 ` Duy Nguyen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1438223527.18134.53.camel@twopensource.com \
--to=dturner@twopensource.com \
--cc=git@vger.kernel.org \
--cc=pclouds@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.