From: Junio C Hamano <junkio@cox.net>
To: git@vger.kernel.org
Cc: Linus Torvalds <torvalds@osdl.org>
Subject: Re: maintenance of cache-tree data
Date: Tue, 25 Apr 2006 16:05:56 -0700 [thread overview]
Message-ID: <7vy7xttfvv.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <7vk69e61s4.fsf@assigned-by-dhcp.cox.net> (Junio C. Hamano's message of "Mon, 24 Apr 2006 15:34:35 -0700")
Junio C Hamano <junkio@cox.net> writes:
> Well, I was blind ;-). As long as the whole-file SHA1 matches,
> read_cache() does not care if we have extra data after the
> series of active_nr cache entry data in the index file.
>
> I'm working on a patch now.
So I did.
There is one bad thing; so far "write-tree" was a read-only
consumer of the index file, but now it primes the cache-tree
structure and needs to update the index. But that is minor.
While I was at it, I made this "stuffing extra cruft in the
index" slightly more generic than I needed it for this
particular application. What I see this _might_ be useful for
are:
- We would want to store which commit of a subproject a
particular subdirectory came from. This was one missing
piece from the "bind commit" proposal that wasn't implemented
in the jc/bind branch.
- We might want to record "at this path there is a directory,
albeit empty"; this cannot be expressed with an usual index
entry.
We might be able to use cache-tree for that, but I think this
is something different at the logical level. While
cache-tree is to be fully populated (by write-tree and
perhaps read-tree later) and invalidated partially when
update-index and friends smudge part of the tree, this is not
something we would want to even invalidate (IOW, it should
always be up-to-date), so they serve different purposes.
I still haven't looked at the read-tree yet, but as I outlined
in a previous message, its intra-index merge could take
advantage of cache-tree. "diff-index", especially "--cached"
kind, also could use it to skip unchanged subtrees altogether.
prev parent reply other threads:[~2006-04-25 23:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-23 23:52 [PATCH 4/4] Invalidate cache-tree entries for touched paths in git-apply Junio C Hamano
2006-04-24 1:25 ` Junio C Hamano
2006-04-24 2:47 ` Junio C Hamano
2006-04-24 3:03 ` [PATCH 5/4] Minimum fixups to cache-tree Junio C Hamano
2006-04-24 5:41 ` 50% speed-up of "git-apply && git-write-tree" sequence Junio C Hamano
2006-04-24 21:31 ` maintenance of cache-tree data Junio C Hamano
2006-04-24 22:34 ` Junio C Hamano
2006-04-25 23:05 ` Junio C Hamano [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=7vy7xttfvv.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=git@vger.kernel.org \
--cc=torvalds@osdl.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).