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

Re: [PATCH 5/5] unpack_trees(): add support for sparse checkout

From
Jakub Narebski <jnareb@gmail.com>
Date
Jul 29, 2009, 11:48 UTC
Message-ID
<m3zlan1zhv.fsf@localhost.localdomain>
In-Reply-To
<1248850154-5469-6-git-send-email-pclouds@gmail.com>
Nguyễn Thái Ngọc Duy    <pclouds@gmail.com> writes:
> This patch teaches unpack_trees() to checkout/remove entries
> on working directories appropriately when sparse checkout area is
> changed. A helper "git shape-workdir" is needed to help determine
> which entry will be checked out, which will be not.
Wouldn't "git update-index --index-info" (perhaps extended) be enough?
Show 13 quoted lines
> 
> "git shape-workdir" will receive from stdin in this format
> 
> X\tpathname
> 
> where X is either
>  - '!' current entry is already CE_VALID
>  - 'N' current entry is "new" (it has not been in index before)
>  - '-' current entry is "normal" entry
> 
> "git shape-workdir" is expected to return either "1" or "0"
> immediately. "1" means the entry should be in workdir. "0" means
> setting CE_VALID and get rid of it from workdir.

Just in case it would be better IMVHO if it returned "1\tpathname" or "2\tpathname". By the way, is 'pathname' quoted if necessary, and does git-shape-workdir support -z/--null option?

Signoff (also in some other patches in this series)?
-- 
Jakub Narebski
Poland
ShadeHawk on #git
Previous: Nguyễn Thái Ngọc DuyNext: Nguyen Thai Ngoc Duy
Message 7 of 15 in “Sparse checkout resurrection”
  1. 0/5 Sparse checkout resurrectionNguyễn Thái Ngọc Duy, Jul 29, 2009
  2. 1/5 Prevent diff machinery from examining worktree outside sparse checkoutNguyễn Thái Ngọc Duy, Jul 29, 2009
  3. 2/5 grep: skip files outside sparse checkout areaNguyễn Thái Ngọc Duy, Jul 29, 2009
  4. 3/5 gitignore: read from index if .gitignore is not in worktreeNguyễn Thái Ngọc Duy, Jul 29, 2009
  5. 4/5 unpack_trees(): keep track of unmerged entriesNguyễn Thái Ngọc Duy, Jul 29, 2009
  6. 5/5 unpack_trees(): add support for sparse checkoutNguyễn Thái Ngọc Duy, Jul 29, 2009
  7. Jakub NarebskiJul 29, 2009
  8. Nguyen Thai Ngoc DuyJul 29, 2009
  9. Jakub NarebskiJul 30, 2009
  10. Junio C HamanoJul 31, 2009
  11. Junio C HamanoJul 31, 2009
  12. Nguyen Thai Ngoc DuyAug 4, 2009
  13. Junio C HamanoJul 31, 2009
  14. skillzero@gmail.comJul 31, 2009
  15. Nguyen Thai Ngoc DuyAug 4, 2009

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.