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

Re: git-clone seems dead

From
GLGreg Louis <glouis@dynamicro.on.ca>
Date
Sep 11, 2005, 22:04 UTC
Message-ID
<20050911220421.GA14593@athame.dynamicro.on.ca>
In-Reply-To
<7vd5nfs9y0.fsf@assigned-by-dhcp.cox.net>
On 20050911 (Sun) at 1204:07 -0700, Junio C Hamano wrote:
Show 31 quoted lines
> Peter Eriksen <s022018@student.dtu.dk> writes:
> 
> > All commands works fine except "git clone" which prints:
> >
> > <cite>
> > defaulting to local storage area
> > * git clone [-l [-s]] [-q] [-u <upload-pack>] <repo> <dir>
> > </cite>
> >
> > and leaves my-git/.git empty.  So the problem is, that I can't
> > get "git clone" to work, and I think, I am making correct steps.
> 
> Hmph.  All your steps seem sane, and after removing my git
> installation on one of my machines I tried the exact steps as
> above but did not get this.
> 
> The message 'defaulting to local storage area' comes from git-init-db,
> and '* git clone ...' comes from usage.
> 
>     dir="$2"
>     mkdir "$dir" &&
>     D=$(
>             (cd "$dir" && git-init-db && pwd)
>     ) &&
>     test -d "$D" || usage
> 
> If you had my-git directory you would get the usage but not
> 'defaulting...', so that is not it.  The only possibility I
> could think of is your 'pwd' says something different than the
> working directory name?  I am very confused..
> 

I had the same. I was using bash with CDPATH; when CDPATH is in use and you do a cd to a relative directory, bash prints the absolute pathname on stdout during the cd. So all those relative cd's in $(cd xxx && ... && pwd) in git-clone and a few other places cause bash to print the absolute path on stdout, greatly confusing the code that uses the output text that it thinks came from pwd. I have a patch to add &>/dev/null in what I think are all the right places, if you want it, but it may be easiest just to unset CDPATH and see if that fixes the trouble.

-- 
| G r e g  L o u i s         | gpg public key: 0x400B1AA86D9E3E64 |
|  http://www.bgl.nu/~glouis |   (on my website or any keyserver) |
|  http://wecanstopspam.org in signatures helps fight junk email. |
Previous: Junio C HamanoNext: Greg Louis
Message 3 of 11 in “git-clone seems dead”
  1. Peter EriksenSep 11, 2005
  2. Junio C HamanoSep 11, 2005
  3. Greg LouisSep 11, 2005
  4. Redirect cd output to /dev/null, was: git-clone seems deadGreg Louis, Sep 11, 2005
  5. Junio C HamanoSep 12, 2005
  6. Peter EriksenSep 12, 2005
  7. Greg LouisSep 12, 2005
  8. Junio C HamanoSep 12, 2005
  9. Greg LouisSep 12, 2005
  10. Junio C HamanoSep 12, 2005
  11. Greg LouisSep 13, 2005

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.