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

Re: [PATCH] clone: create intermediate directories of destination repo

From
Daniel Barkalow <barkalow@iabervon.org>
Date
Jun 25, 2008, 06:11 UTC
Message-ID
<alpine.LNX.1.00.0806250211000.19665@iabervon.org>
In-Reply-To
<20080625054134.GB2209@sigill.intra.peff.net>
On Wed, 25 Jun 2008, Jeff King wrote:
Show 19 quoted lines
> On Tue, Jun 24, 2008 at 11:20:07AM -0400, Daniel Barkalow wrote:
> 
> > > I am worried that it is too clever. I didn't see an obvious way for
> > > work_tree and git_dir to not have that property, but I think it is still
> > > worth somebody double-checking.
> > 
> > I think you can specify git_dir and work_tree on the command line, and set 
> > them to whatever you want, although I now don't remember whether they're 
> > actually both followed for clone (I tried to match the shell version, 
> > whose behavior didn't make too much sense to me).
> 
> The git_dir variable is always set from the directory provided on the
> command line. However, the work_tree can be overridden by the
> environment. For some reason I missed the giant 'work_tree =
> getenv("GIT_WORK_TREE")' when I looked before. But that means that they
> are not necessarily related.
> 
> So my original patch was too clever. Here is the less clever patch, with
> an extra test that would break with the clever version.
Looks good, thanks.
Acked-by: Daniel Barkalow <barkalow@iabervon.org>
	-Daniel
*This .sig left intentionally blank*
Previous: Jeff King
Message 10 of 10 in “Git clone behaviour change in 1.5.6 (vs 1.5.5.1)”
  1. Kalle VahlmanJun 23, 2008
  2. Daniel BarkalowJun 23, 2008
  3. Jeff KingJun 23, 2008
  4. Brandon CaseyJun 23, 2008
  5. clone: create intermediate directories of destination repoJeff King, Jun 24, 2008
  6. Junio C HamanoJun 24, 2008
  7. Jeff KingJun 24, 2008
  8. Daniel BarkalowJun 24, 2008
  9. Jeff KingJun 25, 2008
  10. Daniel BarkalowJun 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.