git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Notes on supporting Git operations in/on partial Working Directories

From
A Large Angry SCM <gitzilla@gmail.com>
Date
Sep 14, 2006, 20:19 UTC
Message-ID
<4509B954.60101@gmail.com>
In-Reply-To
<7vu03a2po8.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
> A Large Angry SCM <gitzilla@gmail.com> writes:
...
Show 12 quoted lines
> 
> While this may be a good start, you need a lot more than this if
> you want to do (1) and (2):
> 
> The tree object contained by a commit is by definition a full
> tree snapshot, so if you want to do a WD_Prefix, you somehow
> need a way to come up with the final tree that is a combination
> of what write-tree would write out from such a partial index
> (i.e. an index that describes only a subdirectory) and the rest
> of the tree from the current HEAD.  I think you can more or less
> do this change to Porcelain using today's git core.  The
> sequence to emulate it with the today's git would be:

I think you misunderstood, the index file would list all of the tree entries of the the checked out commit, same as the current index, but would flag the entries that are actually present in the working directory. The WD_Prefix is to identify which index entries _can not_ be part of the working directory, and where the working directory fits in the full index. That way, all the information needed by the top level write-tree is still in the index and the cache-tree extension.

Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 13 in “Notes on supporting Git operations in/on partial Working Directories”
  1. A Large Angry SCMSep 14, 2006
  2. Shawn PearceSep 14, 2006
  3. A Large Angry SCMSep 14, 2006
  4. Junio C HamanoSep 14, 2006
  5. A Large Angry SCMSep 14, 2006
  6. Junio C HamanoSep 15, 2006
  7. A Large Angry SCMSep 15, 2006
  8. Junio C HamanoSep 17, 2006
  9. A Large Angry SCMSep 17, 2006
  10. Jakub NarebskiSep 17, 2006
  11. A Large Angry SCMSep 17, 2006
  12. Jakub NarebskiSep 17, 2006
  13. A Large Angry SCMSep 17, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.