From: Pavel Roskin <proski@gnu.org>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: Re: Caching directories
Date: Wed, 25 Jan 2006 02:29:32 -0500 [thread overview]
Message-ID: <1138174172.27366.116.camel@dv> (raw)
In-Reply-To: <7vvew8zwfe.fsf@assigned-by-dhcp.cox.net>
On Tue, 2006-01-24 at 21:52 -0800, Junio C Hamano wrote:
> Pavel Roskin <proski@gnu.org> writes:
>
> > Maybe it's time to start caching directories in git? I mean,
> > directories corresponding to tree objects could have their stats
> > recorded in the cache. This would allow to distinguish between tracked
> > and untracked directories without scanning them recursively.
>
> I do not understand the above logic.
>
> Given a directory path, finding out if the directory has
> something tracked in it is an O(log n) operation in the current
> index that does not "cache directory". Your message implies
> that you feel we could use the index file to list "untracked
> directories" without recursively scanning the directory tree,
> but to me, the only way to do that is to record a new directory
> in the index file every time somebody (either Makefile or the
> user) creates a junk directory. That does not make much sense
> to me, so I am probably misreading what you really meant.
Sorry, it looks like my post was based on incorrect assumptions. The
new --directory option to git-ls-files seems to be exactly what I want.
It allowed me to simplify cg-clean immensely. Further simplification
will be possible once the support for .gitignore in parent directories
is fixed.
> I have no idea what 'clean' does, so would not comment on that
> part of your message.
It means removing untracked files and directories.
--
Regards,
Pavel Roskin
prev parent reply other threads:[~2006-01-25 7:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-24 4:20 Caching directories Pavel Roskin
2006-01-25 5:52 ` Junio C Hamano
2006-01-25 7:29 ` Pavel Roskin [this message]
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=1138174172.27366.116.camel@dv \
--to=proski@gnu.org \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/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.