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

Re: Feedback outside of the user survey

From
Andreas Ericsson <ae@op5.se>
Date
Oct 20, 2008, 09:57 UTC
Message-ID
<48FC55F9.3060509@op5.se>
In-Reply-To
<48F9EC2B.2010200@jaeger.mine.nu>
Christian Jaeger wrote:
Show 53 quoted lines
> Garry Dolley wrote:
>> On Thu, Oct 16, 2008 at 10:32:56PM +0200, Christian Jaeger wrote:
>>  
>>> Hm, I don't see a fundamental technical problem which would prevent 
>>> one from implementing the ability to checkout only a subdirectory 
>>> into the working directory (i.e. to add options to Git to make it 
>>> reflect the working directory as being a subdirectory of what is in 
>>> Git's database). At this level I don't see anything inherently 
>>> different from SVN--except maybe for directory renames: if someone 
>>> else is renaming the directory you've checked out, what should 
>>> happend with your checkout? Git's filebased rename tracking would 
>>> just lead to everything vanishing from your checkout. I don't know 
>>> what happens in SVN, maybe it keeps track of the directory rename and 
>>> still sends you the changes of the directory you've checked out even 
>>> if it has now a different name on the server?
>>>
>>> Anyway, an unavoidable difference is that you have to always clone 
>>> the whole Git *database*. With SVN the database stays on the server, 
>>> with Git it is being cloned. Just as I expect SVN to need the whole 
>>> database to be [...]
>>>     
>>
>> Right, but I think cloning the entire git database just to get a
>> subdir is a fundamental technical problem.  It's no different than
>> git-clone + checkout + rm -rf <what I don't want in working tree>
>>   
> 
> We're in "violent agreement" here.
> 
>> In that sense, git already has support for cloning subdirectories,
>> which is why I don't think this method applies to what the original
>> post author meant when they referred to "support for cloning sub
>> directories".
>>   
> 
> I just think it's worth pointing out the difference between the working 
> dir and the database. It should be as easy to implement checking out 
> subdirectories in Git as it was in SVN (except, again, that, iff 
> directory renames should be tracked, some code would have to be written 
> to find out about directory renames, which SVN solves in a simpler way 
> by just requiring that the user specifies renames explicitely). It's 
> worth pointing out that working directory checkouts and database cloning 
> are separate operatoins and it's only the database cloning which is, per 
> definition (as it is a distributed VCS) different from SVN.
> 
>> :)
>>   
> 
> If you really wanted, I suppose you could additionally look into 
> implementing a kind of shallow cloning that only copies objects over the 
> wire which are necessary for representing the subdirectory you're 
> interested in.
> 

So what do you do when one such commit also affects something outside the subdirectory?

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231
Previous: Christian JaegerNext: Christian Jaeger
Message 9 of 17 in “Feedback outside of the user survey”
  1. Richard HartmannOct 16, 2008
  2. Jeff KingOct 16, 2008
  3. Richard HartmannOct 16, 2008
  4. Garry DolleyOct 16, 2008
  5. Richard HartmannOct 16, 2008
  6. Christian JaegerOct 16, 2008
  7. Garry DolleyOct 18, 2008
  8. Christian JaegerOct 18, 2008
  9. Andreas EricssonOct 20, 2008
  10. Christian JaegerOct 20, 2008
  11. Andreas EricssonOct 20, 2008
  12. Christian JaegerOct 20, 2008
  13. Andreas EricssonOct 20, 2008
  14. Christian JaegerOct 20, 2008
  15. Christian JaegerOct 20, 2008
  16. Junio C HamanoOct 20, 2008
  17. Christian JaegerOct 21, 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.