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

Re: [RFC PATCH v3 8/8] --sparse for porcelains

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Aug 16, 2009, 08:14 UTC
Message-ID
<alpine.DEB.1.00.0908161002460.8306@pacific.mpi-cbg.de>
In-Reply-To
<200908160137.30384.jnareb@gmail.com>
Hi,
On Sun, 16 Aug 2009, Jakub Narebski wrote:
Show 24 quoted lines
> On Sat, 15 Aug 2009, Junio C Hamano wrote:
> > Jakub Narebski <jnareb@gmail.com> writes:
> > 
> >>>> Hmmm... this looks like either argument for introducing --full 
> >>>> option to git-checkout (ignore CE_VALID bit, checkout everything, 
> >>>> and clean CE_VALID (?))...
> >>>>
> >>>>  ...or for going with _separate_ bit for partial checkout, like in 
> >>>>  the very first version of this series, which otherwise functions 
> >>>>  like CE_VALID, or is just used to mark that CE_VALID was set using 
> >>>>  sparse.
> > 
> > How would a separate bit help?  Just like you need to clear CE_VALID 
> > bit to revert the index into a normal (or "non sparse") state somehow, 
> > you would need to have a way to clear that separate bit anyway.
> > 
> > A separate bit would help only if you want to handle assume-unchanged 
> > and sparse checkout independently. But my impression was that the 
> > recent lstat reduction effort addressed the issue assume-unchanged 
> > were invented to work around in the first place.
> 
> Well, if we assume that we don't need (don't want) to handle 
> assume-unchanged and sparse checkout independently, then of course the 
> idea of having separate or additional bit for sparse doesn't make sense.

For the shallow/graft issue, we had a similar discussion. Back then, I was convinced that shallow commits and grafted commits were something fundamentally different, and my recent patch to pack-objects shows that: shallow commits do not have the real parents in the current repository, and that makes them different from other grafted commits.

Now, if you want to say that assume-unchanged and sparse are two fundamentally different things, I would be interested in some equally convincing argument as for the shallow/graft issue.

There is a fundamental difference, I grant you that: the working directory does not contain the "sparse'd away" files while the same is not true for assume-unchanged files.

But does that matter? The corresponding files are still in the index and the repository.

IOW under what circumstances would you want to be able to discern between assume-unchanged and "sparse'd away" files in the working directory?

I could _imagine_ that you'd want a tool that allows you to change the 
focus of the sparse checkout together with the working directory.  
Example: you have a sparse checkout of Documentation/ and now you want to 
have t/, too.  Just changing .git/info/sparse will not be enough.

The question is if the tool to change the "sparseness" [*1*] should not change .git/info/sparse itself; if it does not, it would be good to be able to discern between the "assume-unchanged" and "sparse'd away" files.

Although it might be enough to traverse the index and check the presence of the assume-unchanged files in the working directory to determine which files are sparse, and which ones are merely assume-unchanged.

Ciao, Dscho

Footnote [*1*]: I think we need some nice and clear nomenclature here. Any English wizards with a good taste of naming things?

Previous: Jakub NarebskiNext: Johannes Schindelin
Message 18 of 53 in “Sparse checkout”
  1. 0/8 Sparse checkoutNguyễn Thái Ngọc Duy, Aug 11, 2009
  2. 1/8 Prevent diff machinery from examining assume-unchanged entries on worktreeNguyễn Thái Ngọc Duy, Aug 11, 2009
  3. 2/8 Avoid writing to buffer in add_excludes_from_file_1()Nguyễn Thái Ngọc Duy, Aug 11, 2009
  4. 3/8 Read .gitignore from index if it is assume-unchangedNguyễn Thái Ngọc Duy, Aug 11, 2009
  5. 4/8 excluded_1(): support exclude "directories" in indexNguyễn Thái Ngọc Duy, Aug 11, 2009
  6. 5/8 dir.c: export excluded_1() and add_excludes_from_file_1()Nguyễn Thái Ngọc Duy, Aug 11, 2009
  7. 6/8 unpack-trees.c: generalize verify_* functionsNguyễn Thái Ngọc Duy, Aug 11, 2009
  8. 7/8 Support sparse checkout in unpack_trees() and read-treeNguyễn Thái Ngọc Duy, Aug 11, 2009
  9. 8/8 --sparse for porcelainsNguyễn Thái Ngọc Duy, Aug 11, 2009
  10. Junio C HamanoAug 12, 2009
  11. Nguyen Thai Ngoc DuyAug 12, 2009
  12. Nguyen Thai Ngoc DuyAug 13, 2009
  13. Jakub NarebskiAug 13, 2009
  14. Nguyen Thai Ngoc DuyAug 13, 2009
  15. Jakub NarebskiAug 14, 2009
  16. Junio C HamanoAug 15, 2009
  17. Jakub NarebskiAug 15, 2009
  18. Johannes SchindelinAug 16, 2009
  19. Johannes SchindelinAug 17, 2009
  20. Nguyen Thai Ngoc DuyAug 17, 2009
  21. Johannes SchindelinAug 17, 2009
  22. Nguyen Thai Ngoc DuyAug 17, 2009
  23. Johannes SchindelinAug 17, 2009
  24. Nguyen Thai Ngoc DuyAug 17, 2009
  25. Junio C HamanoAug 17, 2009
  26. Nguyen Thai Ngoc DuyAug 17, 2009
  27. Johannes SchindelinAug 17, 2009
  28. Junio C HamanoAug 17, 2009
  29. Johannes SchindelinAug 17, 2009
  30. skillzero@gmail.comAug 17, 2009
  31. Johannes SchindelinAug 17, 2009
  32. Jakub NarebskiAug 18, 2009
  33. skillzero@gmail.comAug 18, 2009
  34. Nguyen Thai Ngoc DuyAug 18, 2009
  35. git find (was: [RFC PATCH v3 8/8] --sparse for porcelains)Jakub Narebski, Aug 18, 2009
  36. Nguyen Thai Ngoc DuyAug 18, 2009
  37. Jakub NarebskiAug 18, 2009
  38. Jakub NarebskiAug 18, 2009
  39. skillzero@gmail.comAug 18, 2009
  40. Junio C HamanoAug 17, 2009
  41. Johannes SchindelinAug 17, 2009
  42. Jakub NarebskiAug 17, 2009
  43. Johannes SixtAug 12, 2009
  44. Nguyen Thai Ngoc DuyAug 12, 2009
  45. Raja R HarinathAug 12, 2009
  46. Johannes SixtAug 13, 2009
  47. skillzero@gmail.comAug 11, 2009
  48. Jakub NarebskiAug 11, 2009
  49. skillzero@gmail.comAug 11, 2009
  50. Nguyen Thai Ngoc DuyAug 12, 2009
  51. skillzero@gmail.comAug 12, 2009
  52. Junio C HamanoAug 12, 2009
  53. Nguyen Thai Ngoc DuyAug 13, 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.