threads / discuss / 3916

cg-clone produces "___" file and no working tree

Subject: cg-clone produces "___" file and no working tree

## tl;dr

15 messages between Apr 19, 2006 and Apr 20, 2006.

replies: 14people: 3as markdown or json

Zack Brown· Apr 19, 2006, 05:36 UTC · lore
Hi folks,

I'm experiencing a problem that seems like it must be my fault, but I can't figure it out. I'm using cogito-0.17.2-ga543f4f and git version 1.3.0.g2473-dirty.

When I do something like cg-clone rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/git.git

The first few lines of output are:

defaulting to local storage area warning: templates not found /home/zbrown/share/git-core/templates/ /home/zbrown/git/cogito/cg-clone: line 137: .git/info/cg-fetch-earlydie: No such file or directory /home/zbrown/git/cogito/cg-clone: line 148: .git/info/cg-fetch-initial: No such file or directory

The rest of the process seems to go without incident. However, when I look at the repository I see:

$ ls -A .git ___ $

Then when I cat the "___" file, I see:

$ cat ___ This is a clone-in-progress GIT working tree containing a GIT repository in the .git subdirectory. If you see this file and noone is fetching or cloning in this repository, the clone has been interrupted; you can restart it by issuing this command (it's enough as-is):

        cg-fetch
$

I give the "cg-fetch" command as instructed, but it seems to have no effect, and the "___" file remains unchanged.

What is going on? I'm completely unable to clone a repository. If I try "git clone rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/git.git", I get this error: "git: 'clone' is not a git-command", and it prints a usage page, but "clone" is listed on that usage page.

I don't know what to make of this, and I don't see any other discussion of this problem, so I assume it's my own fault, but I don't see what I might have done wrong.

Be well, Zack

-- 
Zack Brown
Junio C Hamano· Apr 19, 2006, 06:53 UTC · re: Zack Brown · lore

Re: cg-clone produces "___" file and no working tree

Zack Brown <zbrown@tumblerings.org> writes:
> What is going on? I'm completely unable to clone a repository.

I have no idea how cg-* is broken, so I'll let Pasky answer that, but I suspect your git installation is broken.

> If I try
> "git clone rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/git.git",
> I get this error: "git: 'clone' is not a git-command", and it prints a usage
> page, but "clone" is listed on that usage page.

That sounds intersting. Although rsync is deprecated for a long time and git:// is the preferred transport, I do not get "is not a git-command" error. Are you installing things correctly?

For example, as the first paragraph of INSTALL says, if you override prefix= from the make command line, you need to do so consistently when you build and when you install.

What do these command say?
	$ git --exec-path
	$ ls -l "`git --exec-path`/git-clone"
Zack Brown· Apr 19, 2006, 14:16 UTC · re: Junio C Hamano · lore

Re: cg-clone produces "___" file and no working tree

On Tue, Apr 18, 2006 at 11:53:38PM -0700, Junio C Hamano wrote:
Show 15 quoted lines
> Zack Brown <zbrown@tumblerings.org> writes:
> 
> > What is going on? I'm completely unable to clone a repository.
> 
> I have no idea how cg-* is broken, so I'll let Pasky answer
> that, but I suspect your git installation is broken.
> 
> > If I try
> > "git clone rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/git.git",
> > I get this error: "git: 'clone' is not a git-command", and it prints a usage
> > page, but "clone" is listed on that usage page.
> 
> That sounds intersting.  Although rsync is deprecated for a long
> time and git:// is the preferred transport, I do not get "is not
> a git-command" error.  Are you installing things correctly?

I think so. I was able to reproduce this behavior using the tarballs that are used to start out a new user with git and cogito; as well as with the latest version in the repository.

But I also thought the rsync deprecation was not really true. Wasn't that discussed here recently? I thought the conclusion was that folks *wanted* to deprecate it, but at the moment it was still the best way to accomplish certain things.

Show 9 quoted lines
> 
> For example, as the first paragraph of INSTALL says, if you
> override prefix= from the make command line, you need to do so
> consistently when you build and when you install.
> 
> What do these command say?
> 
> 	$ git --exec-path
> 	$ ls -l "`git --exec-path`/git-clone"

22:07:05 [zbrown] ~$ git --exec-path /home/zbrown/bin 07:10:34 [zbrown] ~$ ls -l "`git --exec-path`/git-clone" ls: /home/zbrown/bin/git-clone: No such file or directory

Does that mean it's looking in /home/zbrown/bin for the git binaries? That's weird. I have /home/zbrown/git/git and /home/zbrown/git/cogito in my $PATH specifically to hold those executables. There's no git stuff in /home/zbrown/bin.

Be well, Zack

> 
-- 
Zack Brown
Petr Baudis· Apr 19, 2006, 09:49 UTC · re: Zack Brown · lore

Re: cg-clone produces "___" file and no working tree

Dear diary, on Wed, Apr 19, 2006 at 07:36:40AM CEST, I got a letter where Zack Brown <zbrown@tumblerings.org> said that...

Show 16 quoted lines
> When I do something like
> cg-clone rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/git.git
> 
> The first few lines of output are:
> 
> defaulting to local storage area
> warning: templates not found /home/zbrown/share/git-core/templates/
> /home/zbrown/git/cogito/cg-clone: line 137: .git/info/cg-fetch-earlydie: No such file or directory
> /home/zbrown/git/cogito/cg-clone: line 148: .git/info/cg-fetch-initial: No such file or directory
> 
> The rest of the process seems to go without incident. However, when I look
> at the repository I see:
> 
> $ ls -A
> .git  ___
> $

Could you please list the contents of the .git subdirectory? It seems that git-init-db did not create the .git/info subdirectory.

I suspect that something went wrong with your installation and in fact you are using much older git version. Check git --version and if `which git-init-db` corresponds to `which git`.

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Right now I am having amnesia and deja-vu at the same time.  I think
I have forgotten this before.
Zack Brown· Apr 19, 2006, 14:21 UTC · re: Petr Baudis · lore

Re: cg-clone produces "___" file and no working tree

Hi Petr,
On Wed, Apr 19, 2006 at 11:49:16AM +0200, Petr Baudis wrote:
Show 21 quoted lines
> Dear diary, on Wed, Apr 19, 2006 at 07:36:40AM CEST, I got a letter
> where Zack Brown <zbrown@tumblerings.org> said that...
> > When I do something like
> > cg-clone rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/git.git
> > 
> > The first few lines of output are:
> > 
> > defaulting to local storage area
> > warning: templates not found /home/zbrown/share/git-core/templates/
> > /home/zbrown/git/cogito/cg-clone: line 137: .git/info/cg-fetch-earlydie: No such file or directory
> > /home/zbrown/git/cogito/cg-clone: line 148: .git/info/cg-fetch-initial: No such file or directory
> > 
> > The rest of the process seems to go without incident. However, when I look
> > at the repository I see:
> > 
> > $ ls -A
> > .git  ___
> > $
> 
> Could you please list the contents of the .git subdirectory? It seems
> that git-init-db did not create the .git/info subdirectory.

07:19:57 [zbrown] ~/git/trees/tmp/git/.git$ ls -F total 28 4 HEAD 4 branches/ 4 config 4 index 4 info/ 4 objects/ 4 refs/

> 
> I suspect that something went wrong with your installation and in fact
> you are using much older git version. Check git --version and if `which
> git-init-db` corresponds to `which git`.

07:11:13 [zbrown] ~$ git --version git version 1.3.0.g2473-dirty 07:18:38 [zbrown] ~$ which git-init-db /home/zbrown/git/git//git-init-db 07:18:52 [zbrown] ~$ which git /home/zbrown/git/git//git 07:18:54 [zbrown] ~$

I assume the "-dirty" in the version number means it thinks I've made some changes, but I really haven't. Maybe the repo got corrupted somehow.

Be well, Zack

Show 6 quoted lines
> 
> -- 
> 				Petr "Pasky" Baudis
> Stuff: http://pasky.or.cz/
> Right now I am having amnesia and deja-vu at the same time.  I think
> I have forgotten this before.
-- 
Zack Brown
Petr Baudis· Apr 19, 2006, 14:48 UTC · re: Zack Brown · lore

Re: cg-clone produces "___" file and no working tree

  Hi,

Dear diary, on Wed, Apr 19, 2006 at 04:21:31PM CEST, I got a letter where Zack Brown <zbrown@tumblerings.org> said that...

Show 26 quoted lines
> On Wed, Apr 19, 2006 at 11:49:16AM +0200, Petr Baudis wrote:
> > Dear diary, on Wed, Apr 19, 2006 at 07:36:40AM CEST, I got a letter
> > where Zack Brown <zbrown@tumblerings.org> said that...
> > > When I do something like
> > > cg-clone rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/git.git
> > > 
> > > The first few lines of output are:
> > > 
> > > defaulting to local storage area
> > > warning: templates not found /home/zbrown/share/git-core/templates/
> > > /home/zbrown/git/cogito/cg-clone: line 137: .git/info/cg-fetch-earlydie: No such file or directory
> > > /home/zbrown/git/cogito/cg-clone: line 148: .git/info/cg-fetch-initial: No such file or directory
> > > 
> > > The rest of the process seems to go without incident. However, when I look
> > > at the repository I see:
> > > 
> > > $ ls -A
> > > .git  ___
> > > $
> > 
> > Could you please list the contents of the .git subdirectory? It seems
> > that git-init-db did not create the .git/info subdirectory.
> 
> 07:19:57 [zbrown] ~/git/trees/tmp/git/.git$ ls -F
> total 28
> 4 HEAD  4 branches/  4 config  4 index  4 info/  4 objects/  4 refs/
  hmm, could you please do this just after running git-init-db in an
empty directory? I just realized cg-fetch will mkdir -p the .git/info/
directory.
  If the .git/info/ directory would be there after git-init-db, I
couldn't explain the
	/home/zbrown/git/cogito/cg-clone: line 137: .git/info/cg-fetch-earlydie: No such file or directory

error. If the .git/info/ directory is not there after git-init-db, either it is somehow broken in git-1.3.0, or it belongs to a much older git version.

> 07:18:38 [zbrown] ~$ which git-init-db
> /home/zbrown/git/git//git-init-db
> 07:18:52 [zbrown] ~$ which git        
> /home/zbrown/git/git//git
  It might be a good idea to compare the ctimes.
-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Right now I am having amnesia and deja-vu at the same time.  I think
I have forgotten this before.
Zack Brown· Apr 20, 2006, 16:49 UTC · re: Petr Baudis · lore

Re: cg-clone produces "___" file and no working tree

Hi Petr,
On Wed, Apr 19, 2006 at 04:48:27PM +0200, Petr Baudis wrote:
Show 27 quoted lines
>   Hi,
> 
> Dear diary, on Wed, Apr 19, 2006 at 04:21:31PM CEST, I got a letter
> where Zack Brown <zbrown@tumblerings.org> said that...
> > On Wed, Apr 19, 2006 at 11:49:16AM +0200, Petr Baudis wrote:
> > > Dear diary, on Wed, Apr 19, 2006 at 07:36:40AM CEST, I got a letter
> > > where Zack Brown <zbrown@tumblerings.org> said that...
> > > > When I do something like
> > > > cg-clone rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/git.git
> > > > 
> > > > The first few lines of output are:
> > > > 
> > > > defaulting to local storage area
> > > > warning: templates not found /home/zbrown/share/git-core/templates/
> > > > /home/zbrown/git/cogito/cg-clone: line 137: .git/info/cg-fetch-earlydie: No such file or directory
> > > > /home/zbrown/git/cogito/cg-clone: line 148: .git/info/cg-fetch-initial: No such file or directory
> > > 
> > > Could you please list the contents of the .git subdirectory? It seems
> > > that git-init-db did not create the .git/info subdirectory.
> > 
> > 07:19:57 [zbrown] ~/git/trees/tmp/git/.git$ ls -F
> > total 28
> > 4 HEAD  4 branches/  4 config  4 index  4 info/  4 objects/  4 refs/
> 
>   hmm, could you please do this just after running git-init-db in an
> empty directory? I just realized cg-fetch will mkdir -p the .git/info/
> directory.

You're right, the "info" directory is not there if I just run git-init-db in an empty directory.

> error. If the .git/info/ directory is not there after git-init-db,
> either it is somehow broken in git-1.3.0, or it belongs to a much older
> git version.

I just downloaded the latest versions of git and cogito from kernel.org: cogito-0.17.2 and git-1.3.0; put their directories in my path, and ran "make" on both of them. There's no other version in my path.

I see the same behavior: git-init-db does not create the .git/info directory.
Show 7 quoted lines
> 
> > 07:18:38 [zbrown] ~$ which git-init-db
> > /home/zbrown/git/git//git-init-db
> > 07:18:52 [zbrown] ~$ which git        
> > /home/zbrown/git/git//git
> 
>   It might be a good idea to compare the ctimes.

09:46:55 [zbrown] ~/git/trees$ "ls" -ltc `which git; which git-init-db` -rwxrwxr-x 2 zbrown zbrown 452312 Apr 20 09:44 /home/zbrown/git/git//git -rwxrwxr-x 1 zbrown zbrown 235282 Apr 20 09:43 /home/zbrown/git/git//git-init-db 09:47:29 [zbrown] ~/git/trees$

Be well, Zack

Show 6 quoted lines
> 
> -- 
> 				Petr "Pasky" Baudis
> Stuff: http://pasky.or.cz/
> Right now I am having amnesia and deja-vu at the same time.  I think
> I have forgotten this before.
-- 
Zack Brown
Junio C Hamano· Apr 20, 2006, 17:36 UTC · re: Zack Brown · lore

Re: cg-clone produces "___" file and no working tree

Zack Brown <zbrown@tumblerings.org> writes:
> I just downloaded the latest versions of git and cogito from kernel.org:
> cogito-0.17.2 and git-1.3.0; put their directories in my path, and ran "make" on
> both of them. There's no other version in my path.
Earlier, you were having this symptom:
Show 11 quoted lines
>> What do these command say?
>> 
>> 	$ git --exec-path
>> 	$ ls -l "`git --exec-path`/git-clone"
>
> 22:07:05 [zbrown] ~$ git --exec-path
> /home/zbrown/bin
> 07:10:34 [zbrown] ~$ ls -l "`git --exec-path`/git-clone"
> ls: /home/zbrown/bin/git-clone: No such file or directory
>
> Does that mean it's looking in /home/zbrown/bin for the git binaries?
If that is the case, you did not just (quote) "and ran "make"".

You must have run "make frotz=xyzzy target", but you did not mention what frotz, xyzzy and target were.

> 09:46:55 [zbrown] ~/git/trees$ "ls" -ltc `which git; which git-init-db`
> -rwxrwxr-x 2 zbrown zbrown 452312 Apr 20 09:44 /home/zbrown/git/git//git
> -rwxrwxr-x 1 zbrown zbrown 235282 Apr 20 09:43 /home/zbrown/git/git//git-init-db
So you are doing
	make bindir=$HOME/git/git/ install

as the last step of your installation. I _strongly_ suspect your breakage is caused because you did a make with different configuration before that. That is, if you do this, that is consistent with the symptom:

	make
	make bindir=$HOME/git/git/ gitexecdir=$HOME/git/git/ install
It probably would help if you did this:
	make clean
	make bindir=$HOME/git/git gitexecdir=$HOME/git/git/
	make bindir=$HOME/git/git gitexecdir=$HOME/git/git/ install

As I said in a previous message, the first paragraph in INSTALL file explains this.

Zack Brown· Apr 20, 2006, 20:08 UTC · re: Junio C Hamano · lore

Re: cg-clone produces "___" file and no working tree

On Thu, Apr 20, 2006 at 10:36:25AM -0700, Junio C Hamano wrote:
Show 24 quoted lines
> Zack Brown <zbrown@tumblerings.org> writes:
> 
> > I just downloaded the latest versions of git and cogito from kernel.org:
> > cogito-0.17.2 and git-1.3.0; put their directories in my path, and ran "make" on
> > both of them. There's no other version in my path.
> 
> Earlier, you were having this symptom:
> 
> >> What do these command say?
> >> 
> >> 	$ git --exec-path
> >> 	$ ls -l "`git --exec-path`/git-clone"
> >
> > 22:07:05 [zbrown] ~$ git --exec-path
> > /home/zbrown/bin
> > 07:10:34 [zbrown] ~$ ls -l "`git --exec-path`/git-clone"
> > ls: /home/zbrown/bin/git-clone: No such file or directory
> >
> > Does that mean it's looking in /home/zbrown/bin for the git binaries?
> 
> If that is the case, you did not just (quote) "and ran "make"".
> 
> You must have run "make frotz=xyzzy target", but you did not mention
> what frotz, xyzzy and target were.
Not true. I went into the git source directory, and ran "make". Nothing more.

I've been doing that for a long time, whenever I sync with the repository. I didn't know the installation instructions had changed.

Show 5 quoted lines
> It probably would help if you did this:
> 
> 	make clean
> 	make bindir=$HOME/git/git gitexecdir=$HOME/git/git/
> 	make bindir=$HOME/git/git gitexecdir=$HOME/git/git/ install

OK, I did this. The first 2 commands worked fine. The third complained of duplicate files, and exited with an error. Maybe because the source tree is also $HOME/git/git

I then did a 'cd ..; mkdir tmp; cd tmp; git-init-db' as before, but there is still no ".git/info" entry created.

Be well, Zack

> 
> As I said in a previous message, the first paragraph in INSTALL
> file explains this.
> 
-- 
Zack Brown
Junio C Hamano· Apr 20, 2006, 20:17 UTC · re: Zack Brown · lore

Re: cg-clone produces "___" file and no working tree

Zack Brown <zbrown@tumblerings.org> writes:
> Not true. I went into the git source directory, and ran "make". Nothing more.

Ah, I misunderstood. You are trying to run it _without_ installing it.

Well, then probably you do not have templates installed anywhere, especially not where git-init-db expects them to be found.

Petr Baudis· Apr 20, 2006, 20:19 UTC · re: Junio C Hamano · lore

Re: cg-clone produces "___" file and no working tree

Dear diary, on Thu, Apr 20, 2006 at 10:17:38PM CEST, I got a letter where Junio C Hamano <junkio@cox.net> said that...

Show 10 quoted lines
> Zack Brown <zbrown@tumblerings.org> writes:
> 
> > Not true. I went into the git source directory, and ran "make". Nothing more.
> 
> Ah, I misunderstood.  You are trying to run it _without_
> installing it.
> 
> Well, then probably you do not have templates installed
> anywhere, especially not where git-init-db expects them to be
> found.

Duh, but shouldn't git-init-db create .git/info at any rate, even when no templates are installed?

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Right now I am having amnesia and deja-vu at the same time.  I think
I have forgotten this before.
Junio C Hamano· Apr 20, 2006, 20:26 UTC · re: Petr Baudis · lore

Re: cg-clone produces "___" file and no working tree

Petr Baudis <pasky@suse.cz> writes:
> Duh, but shouldn't git-init-db create .git/info at any rate, even when
> no templates are installed?

I do not think so. We tend to lazily create necessary directories under .git/ these days, and absolute minimum git should not need an empty .git/info directory.

If there is something that creates files in .git/info without making sure that leading path exists, we should fix it (maybe update-server-info forgets it? I haven't checked).

Petr Baudis· Apr 20, 2006, 20:35 UTC · re: Junio C Hamano · lore

Re: cg-clone produces "___" file and no working tree

Dear diary, on Thu, Apr 20, 2006 at 10:26:34PM CEST, I got a letter where Junio C Hamano <junkio@cox.net> said that...

Show 12 quoted lines
> Petr Baudis <pasky@suse.cz> writes:
> 
> > Duh, but shouldn't git-init-db create .git/info at any rate, even when
> > no templates are installed?
> 
> I do not think so.  We tend to lazily create necessary
> directories under .git/ these days, and absolute minimum git
> should not need an empty .git/info directory.
> 
> If there is something that creates files in .git/info without
> making sure that leading path exists, we should fix it (maybe
> update-server-info forgets it?  I haven't checked).

Aww. cg-clone assumed that .git/info is canonical part of git repository now and git-init-db will always creat eit, but now it seems to be the case only for .git/objects/info.

I've fixed cg-clone. Thanks for the info.
-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Right now I am having amnesia and deja-vu at the same time.  I think
I have forgotten this before.
Junio C Hamano· Apr 20, 2006, 20:23 UTC · re: Junio C Hamano · lore

Re: cg-clone produces "___" file and no working tree

Junio C Hamano <junkio@cox.net> writes:
Show 10 quoted lines
> Zack Brown <zbrown@tumblerings.org> writes:
>
>> Not true. I went into the git source directory, and ran "make". Nothing more.
>
> Ah, I misunderstood.  You are trying to run it _without_
> installing it.
>
> Well, then probably you do not have templates installed
> anywhere, especially not where git-init-db expects them to be
> found.
(sorry for the short message sent unfinished by mistake).

Running things without installing is somewhat tricky, but test framework needs to do that, so there are some things you would need to do.

 - "git init-db" takes --template argument; in the source area
   before installing, they are built in templates/blt/.
 - "git" and programs that need to invoke other git programs
   (e.g. git-send-pack) expects things to be found in gitexecdir
   you set when you build.  If you are not installing, you need
   to override that with GIT_EXEC_PATH environment variable.

There might be other things, but you should be able to find them from what t/Makefile and t/test-lib.sh do.

Having said that, honestly I would not recommend "runnning without installing" unless you know what you are doing ;-).

Zack Brown· Apr 20, 2006, 21:34 UTC · re: Junio C Hamano · lore

Re: cg-clone produces "___" file and no working tree

Hi,
> honestly I would not recommend "runnning
> without installing" unless you know what you are doing ;-).

OK, you're right, the problem was that I was not doing a proper install. I followed the directions and it worked. Thanks!

Be well, Zack

On Thu, Apr 20, 2006 at 01:23:35PM -0700, Junio C Hamano wrote:
Show 33 quoted lines
> Junio C Hamano <junkio@cox.net> writes:
> 
> > Zack Brown <zbrown@tumblerings.org> writes:
> >
> >> Not true. I went into the git source directory, and ran "make". Nothing more.
> >
> > Ah, I misunderstood.  You are trying to run it _without_
> > installing it.
> >
> > Well, then probably you do not have templates installed
> > anywhere, especially not where git-init-db expects them to be
> > found.
> 
> (sorry for the short message sent unfinished by mistake).
> 
> Running things without installing is somewhat tricky, but test
> framework needs to do that, so there are some things you would
> need to do.
> 
>  - "git init-db" takes --template argument; in the source area
>    before installing, they are built in templates/blt/.
> 
>  - "git" and programs that need to invoke other git programs
>    (e.g. git-send-pack) expects things to be found in gitexecdir
>    you set when you build.  If you are not installing, you need
>    to override that with GIT_EXEC_PATH environment variable.
> 
> There might be other things, but you should be able to find them
> from what t/Makefile and t/test-lib.sh do.
> 
> Having said that, honestly I would not recommend "runnning
> without installing" unless you know what you are doing ;-).
> 

← back to recent threads