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

Re: [RFC PATCH 00/12] Sparse checkout

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
Jul 24, 2008, 23:21 UTC
Message-ID
<fcaeb9bf0807241621y60b0341ej8f9f3b591ef12baf@mail.gmail.com>
In-Reply-To
<200807242201.23991.jnareb@gmail.com>
On 7/25/08, Jakub Narebski <jnareb@gmail.com> wrote:
Show 49 quoted lines
> On Thu, 24 Jul 2008, Nguyen Thai Ngoc Duy wrote:
>
> > On 7/24/08, Jakub Narebski <jnareb@gmail.com> wrote:
>  > >
>  > >  Second, I think you can simply special case .git* files (.gitignore,
>  > >  .gitattributes, .gitmodules), and always check them out for all
>  > >  intermediate directories (unless configured otherwise, of course).
>  > >  So for example if you have the following directory structure:
>  > >
>  > >   A/.gitignore
>  > >   A/a
>  > >   A/B1/.gitignore
>  > >   A/B1/b
>  > >   A/B2/.gitignore
>  > >   A/B2/c
>  > >
>  > >  and you are checking out only subdirectory 'B1' (and all files in it;
>  > >  if subdirectories are checked out recursively it depends on
>  > >  configuration), and if for example there is .gitignore in every
>  > >  directory, then checked out tree would look like this:
>  > >
>  > >   A/.gitignore
>  > >   A/B1/.gitignore
>  > >   A/B1/b
>  > >
>  > >  The ability to do this is one of advantages of 'sparse' checkout over
>  > >  'subtree' checkout.
>  >
>  > Or teach git to use index version of those files. Or collect all those
>  > files, combine them and put the result to .git/info/exclude (and
>  > similar places). Anyway well organized repos won't have this problem.
>  >
>  > Checking some files out as read-only (like this case) may be
>  > interesting. Though I do not how much complicated it can be.
>
>
> I think teaching git to use index version of .git* files (.gitignore,
>  .gitattributes, .gitmodules) would be much more work than adding
>  default rule that .git* files in leading directories are by default
>  checked out, just like leading directories are checked out.  This
>  would limit modifying git code, I think, and chances for errors.
>
>  Having "leading" directories and files read-only would be a good idea,
>  I think.
>
>  I don't understand the sentence "well organized repos won't have this
>  problem". I think well organized repos _would_ have this problem,
>  because of maintained and distributed top-level .gitignore and
>  .gitattributes.

I wrote that with svn repos in mind. If those repos are to be partially checked out, .svnignore would be in subdirectories rather than at toplevel. Anyway that may not be true.

Show 6 quoted lines
>  P.S. I hope that 'sparse checkout' feature would be ready for 1.7.0
>
> --
>  Jakub Narebski
>  Poland
>
-- 
Duy
Previous: Jakub NarebskiNext: Avery Pennarun
Message 25 of 27 in “Sparse checkout”
  1. 00/12 Sparse checkoutNguyễn Thái Ngọc Duy, Jul 23, 2008
  2. Nguyen Thai Ngoc DuyJul 23, 2008
  3. Johannes SchindelinJul 23, 2008
  4. Nguyen Thai Ngoc DuyJul 23, 2008
  5. Johannes SchindelinJul 23, 2008
  6. Nguyen Thai Ngoc DuyJul 24, 2008
  7. Johannes SchindelinJul 24, 2008
  8. Nguyen Thai Ngoc DuyJul 24, 2008
  9. Johannes SchindelinJul 24, 2008
  10. Nguyen Thai Ngoc DuyJul 24, 2008
  11. Avery PennarunJul 24, 2008
  12. Johannes SchindelinJul 24, 2008
  13. Nguyen Thai Ngoc DuyJul 24, 2008
  14. Jan HudecAug 3, 2008
  15. Johannes SchindelinAug 3, 2008
  16. Nguyen Thai Ngoc DuyAug 4, 2008
  17. James PickensJul 24, 2008
  18. Nguyen Thai Ngoc DuyJul 24, 2008
  19. James PickensJul 24, 2008
  20. Nguyen Thai Ngoc DuyJul 24, 2008
  21. James PickensJul 24, 2008
  22. Jakub NarebskiJul 24, 2008
  23. Nguyen Thai Ngoc DuyJul 24, 2008
  24. Jakub NarebskiJul 24, 2008
  25. Nguyen Thai Ngoc DuyJul 24, 2008
  26. Avery PennarunJul 25, 2008
  27. Johannes SchindelinJul 25, 2008

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.