All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 0/4] Make unpack_trees() do separate source and destination indexes
Date: Thu, 06 Mar 2008 21:45:08 -0800	[thread overview]
Message-ID: <7vwsof3x5n.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <cover.1204856187.git.torvalds@linux-foundation.org> (Linus Torvalds's message of "Thu, 6 Mar 2008 18:16:27 -0800")

Linus Torvalds <torvalds@linux-foundation.org> writes:

> Ok, this goes on top of the five-commit series yesterday.  The first two
> patches are pure fixes and cleanups, the third one does a fairly
> mechanical thing to get rid of implied usage of "the_index", and the
> last one actually splits up the source and destination index handling.

What I have been wondering about this series was if we can re-enable
cache-tree for more of the unpack_trees() users.

Currently, all unpack_trees() users, other than a single-tree read-tree,
invalidates the whole cache-tree information, as Daniel's "pop one, decide
what to put back, all in the original index" had too many manual index
manipulations and sprinkling cache_tree_invalidate() call everywhere was
too much cluttering of already hard-to-follow codepath.

I'd want to see at least two-way read-tree preserve as much cache-tree
information as possible.  People often work on one branch to completion
(i.e. make a commit, which involves a write-tree, which leaves a fully
valid cache-tree in the index), switch branches (i.e. two-way read-tree,
which unfortunately decimates cache-tree in the current implementation) to
commit a small fix.  If major parts of the cache-tree were left intact
during branch switching, these unchanged subdirectories do not have to be
rehashed in write-tree when making this final commit.





  parent reply	other threads:[~2008-03-07  5:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-07  2:16 [PATCH 0/4] Make unpack_trees() do separate source and destination indexes Linus Torvalds
2008-03-06 20:26 ` [PATCH 3/4] Make 'unpack_trees()' take the index to work on as an argument Linus Torvalds
2008-03-06 20:46 ` [PATCH 2/4] Add 'const' where appropriate to index handling functions Linus Torvalds
2008-03-06 23:44 ` [PATCH 1/4] Fix tree-walking compare_entry() in the presense of --prefix Linus Torvalds
2008-03-07  2:12 ` [PATCH 4/4] Make 'unpack_trees()' have a separate source and destination index Linus Torvalds
2008-03-07 14:13   ` Johannes Schindelin
2008-03-07 17:32     ` Linus Torvalds
2008-03-07 21:11   ` Daniel Barkalow
2008-03-07 21:48     ` Linus Torvalds
2008-03-07  5:45 ` Junio C Hamano [this message]
2008-03-07 17:46   ` [PATCH 0/4] Make unpack_trees() do separate source and destination indexes Linus Torvalds

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=7vwsof3x5n.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=torvalds@linux-foundation.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 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.