threads / discuss / 2697

lost again on syntax change - local repository?

Subject: lost again on syntax change - local repository?

## tl;dr

14 messages between Nov 28, 2005 and Nov 28, 2005.

replies: 13people: 4as markdown or json

Randal L. Schwartz· Nov 28, 2005, 02:01 UTC · lore

OK, something that I understood broke again. :) Repeating the steps from my previous attempt to understand repositories, knowing that cg-push has been updated:

    localhost:~/Projects/Git/Play % cg-admin-setuprepo remote.git
    localhost:~/Projects/Git/Play % mkdir local.git
    localhost:~/Projects/Git/Play % cd local.git
    localhost:..Git/Play/local.git % cg-init -minitial .
    defaulting to local storage area
    Committing initial tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
    Committed as 6b9850a86bbe2d07bbdaa0c5595c8f4c0423b13c.
    localhost:..Git/Play/local.git % cg-branch-add origin "$(cd ..; pwd)/remote.git#master"
    localhost:..Git/Play/local.git % cg-branch-ls
    origin  /Users/merlyn/Projects/Git/Play/remote.git#master
    localhost:..Git/Play/local.git % 

At this point, I'm where I was before. And this next step worked, although I had to say "origin":

    localhost:..Git/Play/local.git % cg-push
    WARNING: I guessed the host:path syntax was used and fell back to the git+ssh protocol.
    WARNING: The host:path syntax is evil because it is implicit. Please just use a URI.
    ssh: \033]2;[zsh] localhost: No address associated with nodename
    fatal: unexpected EOF

Uh, say what? /some/file/foo.git#branch is no longer legal syntax? Help!

How do I say /some/file on the local filesystem? (I also tried file:/some/file, and that didn't work either.)

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
Junio C Hamano· Nov 28, 2005, 05:11 UTC · re: Randal L. Schwartz · lore

Re: lost again on syntax change - local repository?

merlyn@stonehenge.com (Randal L. Schwartz) writes:
Show 11 quoted lines
> At this point, I'm where I was before.  And this next step worked,
> although I had to say "origin":
>
>     localhost:..Git/Play/local.git % cg-push
>     WARNING: I guessed the host:path syntax was used and fell back to the git+ssh protocol.
>     WARNING: The host:path syntax is evil because it is implicit. Please just use a URI.
>     ssh: \033]2;[zsh] localhost: No address associated with nodename
>     fatal: unexpected EOF
>
> Uh, say what?  /some/file/foo.git#branch is no longer legal syntax?
> Help!

If it is not absolutely necessary that you need to use Cogito, IOW, if git barebone Porcelains are good enough for your use, the following may be adequate.

	$ echo >.git/remotes/origin <<EOF
	URL: /path/to/remote.git/
        Push: master
        Pull: master:origin
        EOF
	$ git push origin

I said "may be" because I do not understand the sequence before "At this point"; how your local.git is initially set up to relate to the remoge.git. I do not see local.git being created by cloning remote.git. But modulo that the above should work fine; I do that as a cheap backup on my local machine.

Alecs King· Nov 28, 2005, 06:36 UTC · re: Junio C Hamano · lore

Re: lost again on syntax change - local repository?

On Sun, Nov 27, 2005 at 09:11:37PM -0800, Junio C Hamano wrote:
> 	$ echo >.git/remotes/origin <<EOF
          ^^^^ you probably meant 'cat'. :)
Show 5 quoted lines
> 	URL: /path/to/remote.git/
>         Push: master
>         Pull: master:origin
>         EOF
> 	$ git push origin
-- 
Alecs King
Randal L. Schwartz· Nov 28, 2005, 13:04 UTC · re: Junio C Hamano · lore

Re: lost again on syntax change - local repository?

>>>>> "Junio" == Junio C Hamano <junkio@cox.net> writes:

Junio> If it is not absolutely necessary that you need to use Cogito, Junio> IOW, if git barebone Porcelains are good enough for your use, Junio> the following may be adequate.

Well, then, you should get rid of cogito/Documentation/introduction.html, if you don't plan on supporting the interfaces described there.

I'm really just starting out. I see that tutorial, and I want to do it.

Junio> $ echo >.git/remotes/origin <<EOF Junio> URL: /path/to/remote.git/ Junio> Push: master Junio> Pull: master:origin Junio> EOF

Ugh, ugh ugh ugh.
Junio> 	$ git push origin

Junio> I said "may be" because I do not understand the sequence before Junio> "At this point"; how your local.git is initially set up to Junio> relate to the remoge.git. I do not see local.git being created Junio> by cloning remote.git.

I can't, because I have to do the first push. This is what I was told last time!

I'm doing what I'm told, and now more things are breaking. This is frustrating.

I'm not saying that you guys aren't doing a hell of a job. I'm just coming at this from a user's perspective, and trying to describe it to others. I'm not comfortable yet, because every time I try to do what the manuals say, it breaks. Perhaps y'all are secretly working around every broken thing, but I don't know enough to do that.

Junio> But modulo that the above should work Junio> fine; I do that as a cheap backup on my local machine.

So, give me the exact steps, using "cg" to:
        create a "remote" repo on my disk
        create a "local" repo on my disk
        set up the linkage between remote and local
        push from local to remote
        pull from remote to local

And if it ever needs a command like "cat" or "echo", something is wrong. I'll accept a "git-" command for one or two of the steps, but that feels like dropping into assembler instead of C.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
Petr Baudis· Nov 28, 2005, 10:48 UTC · re: Randal L. Schwartz · lore

Re: lost again on syntax change - local repository?

Dear diary, on Mon, Nov 28, 2005 at 03:01:18AM CET, I got a letter where "Randal L. Schwartz" <merlyn@stonehenge.com> said that...

>     localhost:..Git/Play/local.git % cg-branch-add origin "$(cd ..; pwd)/remote.git#master"
BTW, it should be fine to just say ../remote.git#master.
Show 12 quoted lines
>     localhost:..Git/Play/local.git % cg-branch-ls
>     origin  /Users/merlyn/Projects/Git/Play/remote.git#master
>     localhost:..Git/Play/local.git % 
> 
> At this point, I'm where I was before.  And this next step worked,
> although I had to say "origin":
> 
>     localhost:..Git/Play/local.git % cg-push
>     WARNING: I guessed the host:path syntax was used and fell back to the git+ssh protocol.
>     WARNING: The host:path syntax is evil because it is implicit. Please just use a URI.
>     ssh: \033]2;[zsh] localhost: No address associated with nodename
>     fatal: unexpected EOF

I did the exact same sequence of commands and everything works just fine for me with both the latest master and the latest v0.16. What Cogito version do you use? Are you sure the origin location is just the local path at the time of cg-push?

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
VI has two modes: the one in which it beeps and the one in which
it doesn't.
Randal L. Schwartz· Nov 28, 2005, 13:09 UTC · re: Petr Baudis · lore

Re: lost again on syntax change - local repository?

>>>>> "Petr" == Petr Baudis <pasky@suse.cz> writes:

Petr> Dear diary, on Mon, Nov 28, 2005 at 03:01:18AM CET, I got a letter Petr> where "Randal L. Schwartz" <merlyn@stonehenge.com> said that...

>> localhost:..Git/Play/local.git % cg-branch-add origin "$(cd ..; pwd)/remote.git#master"
Petr> BTW, it should be fine to just say ../remote.git#master.
Maybe this is why yours worked.
Ahh, yes, it did.
So, cg-push treats '../..' differently from '/foo/bar/...'.
This is bad.  That's the bug.

cg-push treats "../" as a local filesystem, and "/..." as git-ssh. This is a change from before.

Please make it recognize "/..." as a local file again.
-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
Petr Baudis· Nov 28, 2005, 13:41 UTC · re: Randal L. Schwartz · lore

Re: lost again on syntax change - local repository?

Dear diary, on Mon, Nov 28, 2005 at 02:09:40PM CET, I got a letter where "Randal L. Schwartz" <merlyn@stonehenge.com> said that...

Show 15 quoted lines
> >>>>> "Petr" == Petr Baudis <pasky@suse.cz> writes:
> 
> Petr> Dear diary, on Mon, Nov 28, 2005 at 03:01:18AM CET, I got a letter
> Petr> where "Randal L. Schwartz" <merlyn@stonehenge.com> said that...
> >> localhost:..Git/Play/local.git % cg-branch-add origin "$(cd ..; pwd)/remote.git#master"
> 
> Petr> BTW, it should be fine to just say ../remote.git#master.
> 
> Maybe this is why yours worked.
> 
> Ahh, yes, it did.
> 
> So, cg-push treats '../..' differently from '/foo/bar/...'.
> 
> This is bad.  That's the bug.

Nope, the relative path is resolved at the time of adding the branch. Check for yourself:

xpasky@machine[0:0]~/git-devel/x/local.git$ cg-branch-add origin "$(cd ..; pwd)/remote.git#master" xpasky@machine[0:0]~/git-devel/x/local.git$ cg-branch-add origin2 ../remote.git#master xpasky@machine[0:0]~/git-devel/x/local.git$ cg-branch-ls origin /home/xpasky/git-devel/x/remote.git#master origin2 /home/xpasky/git-devel/x/remote.git#master

Pushing to both works fine.
> cg-push treats "../" as a local filesystem, and "/..." as git-ssh.
> This is a change from before.
> 
> Please make it recognize "/..." as a local file again.

It would sure be bad if this was the case. However I'm really sorry, but I still can't reproduce it.

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
VI has two modes: the one in which it beeps and the one in which
it doesn't.
Randal L. Schwartz· Nov 28, 2005, 13:45 UTC · re: Petr Baudis · lore

Re: lost again on syntax change - local repository?

>>>>> "Petr" == Petr Baudis <pasky@suse.cz> writes:

Petr> It would sure be bad if this was the case. However I'm really sorry, but Petr> I still can't reproduce it.

Reproduce by this:
    localhost:~/Projects/Git/Play % cg-admin-setuprepo remote.git
    localhost:~/Projects/Git/Play % mkdir local.git
    localhost:~/Projects/Git/Play % cd local.git
    localhost:..Git/Play/local.git % cg-init -minitial
    defaulting to local storage area
    Committing initial tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
    Committed as 958ed484382609786ca9ae611cc54802cb7697a9.
    localhost:..Git/Play/local.git % cg-branch-add origin "$(cd ..; pwd)/remote.git#master"           
    localhost:..Git/Play/local.git % cg-push
    WARNING: I guessed the host:path syntax was used and fell back to the git+ssh protocol.
    WARNING: The host:path syntax is evil because it is implicit. Please just use a URI.
    ssh: \033]2;[zsh] localhost: No address associated with nodename
    fatal: unexpected EOF
I did this with current-of-the-moment git and cogito:
localhost:~ % cd MIRROR/git-GIT 
localhost:~/MIRROR/git-GIT % cg-status
Heads:
   >master      f1f909e3185b5ee366e198042447afe749bfc813
  R origin      f1f909e3185b5ee366e198042447afe749bfc813
localhost:~ % cd MIRROR/cogito-GIT 
localhost:~/MIRROR/cogito-GIT % cg-status
Heads:
   >master      cec6c5564c6dcc30361f164dce9ac5dc635d202f
  R origin      cec6c5564c6dcc30361f164dce9ac5dc635d202f

If this indeed works on your machine, then we have a Darwin dependency somewhere in cg-push or something it calls.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
Randal L. Schwartz· Nov 28, 2005, 13:59 UTC · re: Randal L. Schwartz · lore

Re: lost again on syntax change - local repository?

>>>>> "Randal" == Randal L Schwartz <merlyn@stonehenge.com> writes:

Randal> localhost:..Git/Play/local.git % cg-branch-add origin "$(cd ..; pwd)/remote.git#master" Randal> localhost:..Git/Play/local.git % cg-push Randal> WARNING: I guessed the host:path syntax was used and fell back to the git+ssh protocol. Randal> WARNING: The host:path syntax is evil because it is implicit. Please just use a URI. Randal> ssh: \033]2;[zsh] localhost: No address associated with nodename Randal> fatal: unexpected EOF

Oh, and make sure ssh is *off* on your machine. You might be getting it to work by ssh'ing back to your own box.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
Petr Baudis· Nov 28, 2005, 14:34 UTC · re: Randal L. Schwartz · lore

Re: lost again on syntax change - local repository?

Dear diary, on Mon, Nov 28, 2005 at 02:45:24PM CET, I got a letter where "Randal L. Schwartz" <merlyn@stonehenge.com> said that...

Show 20 quoted lines
> >>>>> "Petr" == Petr Baudis <pasky@suse.cz> writes:
> 
> Petr> It would sure be bad if this was the case. However I'm really sorry, but
> Petr> I still can't reproduce it.
> 
> Reproduce by this:
> 
>     localhost:~/Projects/Git/Play % cg-admin-setuprepo remote.git
>     localhost:~/Projects/Git/Play % mkdir local.git
>     localhost:~/Projects/Git/Play % cd local.git
>     localhost:..Git/Play/local.git % cg-init -minitial
>     defaulting to local storage area
>     Committing initial tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
>     Committed as 958ed484382609786ca9ae611cc54802cb7697a9.
>     localhost:..Git/Play/local.git % cg-branch-add origin "$(cd ..; pwd)/remote.git#master"           
>     localhost:..Git/Play/local.git % cg-push
>     WARNING: I guessed the host:path syntax was used and fell back to the git+ssh protocol.
>     WARNING: The host:path syntax is evil because it is implicit. Please just use a URI.
>     ssh: \033]2;[zsh] localhost: No address associated with nodename
>     fatal: unexpected EOF
Still works for me.
Could you patch cg-push like
diff --git a/cg-push b/cg-push
index 1d59422..bdab3b8 100755
--- a/cg-push
+++ b/cg-push
@@ -47,6 +47,7 @@ name=${ARGS[0]}
 [ "$name" ] || { [ -s $_git/branches/origin ] && name=origin; }
 [ "$name" ] || die "where to push to?"
 uri=$(cat "$_git/branches/$name" 2>/dev/null) || die "unknown branch: $name"
+echo "using $uri"
 
 rembranch=master
 sprembranch=
@@ -54,6 +55,7 @@ if echo "$uri" | grep -q '#'; then
 	rembranch=$(echo $uri | cut -d '#' -f 2)
 	sprembranch=":$rembranch"
 	uri=$(echo $uri | cut -d '#' -f 1)
+	echo "now using $uri"
 fi
 
 if echo "$uri" | grep -q "^http://"; then
@@ -63,6 +65,7 @@ elif echo "$uri" | grep -q "^git+ssh://"
 elif echo "$uri" | grep -q "^rsync://"; then
         die "pushing over rsync not supported"
 elif echo "$uri" | grep -q ":"; then
+	echo "matched ':' in $uri ?!"
 	echo "WARNING: I guessed the host:path syntax was used and fell back to the git+ssh protocol."
 	echo "WARNING: The host:path syntax is evil because it is implicit. Please just use a URI."
 	send_pack_update "$name" "$uri" $_git_head$sprembranch "${tags[@]}"

please?

(We are a bit careless about quoting here, which I will fix now,
but that shouldn't be the problem.)
-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
VI has two modes: the one in which it beeps and the one in which
it doesn't.
Randal L. Schwartz· Nov 28, 2005, 14:46 UTC · re: Petr Baudis · lore

Re: lost again on syntax change - local repository?

>>>>> "Petr" == Petr Baudis <pasky@suse.cz> writes:

Petr> Could you patch cg-push like [yes]

Here's the result:
    localhost:~/Projects/git/Play % rm -rf *git
    localhost:~/Projects/git/Play % cg-admin-setuprepo remote.git
    localhost:~/Projects/git/Play % mkdir local.git
    localhost:~/Projects/git/Play % cd local.git
    localhost:..git/Play/local.git % cg-init -minitial
    defaulting to local storage area
    Committing initial tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
    Committed as 06223ad471c4f1c60da364310d1dd71a91310346.
    localhost:..git/Play/local.git % cg-branch-add origin "$(cd ..; pwd)/remote.git#master"              
    localhost:..git/Play/local.git % cg-branch-ls
    origin  /Users/merlyn/Projects/git/Play/remote.git#master
    localhost:..git/Play/local.git % cg-push
    using /Users/merlyn/Projects/git/Play/remote.git#master
    now using /Users/merlyn/Projects/git/Play/remote.git
    matched ':' in '/Users/merlyn/Projects/git/Play/remote.git'?
    WARNING: I guessed the host:path syntax was used and fell back to the git+ssh protocol.
    WARNING: The host:path syntax is evil because it is implicit. Please just use a URI.
    ssh: \033]2;[zsh] localhost: No address associated with nodename
    fatal: unexpected EOF
Well, that's curious, eh?
However, I get this:
    localhost:..git/Play/local.git % echo "/Users/merlyn/Projects/git/Play/remote.git" | grep -q ":"
    localhost:..git/Play/local.git % echo $status
    1
So, perhaps the "bash" on this system is broken for that elif chain?

localhost:..git/Play/local.git % bash --version GNU bash, version 2.05b.0(1)-release (powerpc-apple-darwin8.0) Copyright (C) 2002 Free Software Foundation, Inc.

Gah.  Yet Another Hidden Dependency.
-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
Petr Baudis· Nov 28, 2005, 19:15 UTC · re: Randal L. Schwartz · lore

Re: lost again on syntax change - local repository?

Dear diary, on Mon, Nov 28, 2005 at 03:46:09PM CET, I got a letter where "Randal L. Schwartz" <merlyn@stonehenge.com> said that...

Show 13 quoted lines
> However, I get this:
> 
>     localhost:..git/Play/local.git % echo "/Users/merlyn/Projects/git/Play/remote.git" | grep -q ":"
>     localhost:..git/Play/local.git % echo $status
>     1
> 
> So, perhaps the "bash" on this system is broken for that elif chain?
> 
> localhost:..git/Play/local.git % bash --version
> GNU bash, version 2.05b.0(1)-release (powerpc-apple-darwin8.0)
> Copyright (C) 2002 Free Software Foundation, Inc.
> 
> Gah.  Yet Another Hidden Dependency.
Perplexing. Can't reproduce it with bash-2.05b either.
Could you try the following, please?
diff --git a/cg-push b/cg-push
index 1d59422..323ef26 100755
--- a/cg-push
+++ b/cg-push
@@ -56,13 +56,13 @@ if echo "$uri" | grep -q '#'; then
 	uri=$(echo $uri | cut -d '#' -f 1)
 fi
 
-if echo "$uri" | grep -q "^http://"; then
+if [ "${uri#http://}" != "$uri" ]; then
 	die "pushing over HTTP not supported yet"
-elif echo "$uri" | grep -q "^git+ssh://"; then
+elif [ "${uri#git+ssh://}" != "$uri" ]; then
 	send_pack_update "$name" "$(echo "$uri" | sed 's#^git+ssh://\([^/]*\)\(/.*\)$#\1:\2#')" $_git_head$sprembranch "${tags[@]}"
-elif echo "$uri" | grep -q "^rsync://"; then
+elif [ "${uri#rsync://}" != "$uri" ]; then
         die "pushing over rsync not supported"
-elif echo "$uri" | grep -q ":"; then
+elif [ "${uri#*:}" != "$uri" ]; then
 	echo "WARNING: I guessed the host:path syntax was used and fell back to the git+ssh protocol."
 	echo "WARNING: The host:path syntax is evil because it is implicit. Please just use a URI."
 	send_pack_update "$name" "$uri" $_git_head$sprembranch "${tags[@]}"
-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
VI has two modes: the one in which it beeps and the one in which
it doesn't.
Randal L. Schwartz· Nov 28, 2005, 19:25 UTC · re: Petr Baudis · lore

Re: lost again on syntax change - local repository?

>>>>> "Petr" == Petr Baudis <pasky@suse.cz> writes:
Petr> Could you try the following, please?
Petr> diff --git a/cg-push b/cg-push
Petr> index 1d59422..323ef26 100755
Petr> --- a/cg-push
Petr> +++ b/cg-push
Petr> @@ -56,13 +56,13 @@ if echo "$uri" | grep -q '#'; then
Petr>  	uri=$(echo $uri | cut -d '#' -f 1)
Petr>  fi
 
Petr> -if echo "$uri" | grep -q "^http://"; then
Petr> +if [ "${uri#http://}" != "$uri" ]; then
Petr>  	die "pushing over HTTP not supported yet"
Petr> -elif echo "$uri" | grep -q "^git+ssh://"; then
Petr> +elif [ "${uri#git+ssh://}" != "$uri" ]; then
Petr>  	send_pack_update "$name" "$(echo "$uri" | sed 's#^git+ssh://\([^/]*\)\(/.*\)$#\1:\2#')" $_git_head$sprembranch "${tags[@]}"
Petr> -elif echo "$uri" | grep -q "^rsync://"; then
Petr> +elif [ "${uri#rsync://}" != "$uri" ]; then
Petr>          die "pushing over rsync not supported"
Petr> -elif echo "$uri" | grep -q ":"; then
Petr> +elif [ "${uri#*:}" != "$uri" ]; then
Petr>  	echo "WARNING: I guessed the host:path syntax was used and fell back to the git+ssh protocol."
Petr>  	echo "WARNING: The host:path syntax is evil because it is implicit. Please just use a URI."
Petr>  	send_pack_update "$name" "$uri" $_git_head$sprembranch "${tags[@]}"
Bizarrely, same behavior.  Mark me "puzzled".
    localhost:~/Projects/Git/Play % cg-admin-setuprepo remote.git        
    localhost:~/Projects/Git/Play % mkdir local.git
    localhost:~/Projects/Git/Play % cd local.git 
    localhost:..Git/Play/local.git % cg-init -mempty
    defaulting to local storage area
    Committing initial tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
    Committed as ee28097d96063ae660faf325f5bffdbcbc6818f4.
    localhost:..Git/Play/local.git % cg-branch-add origin "$(cd ..; pwd)/remote.git#master"           
    localhost:..Git/Play/local.git % cg-branch-ls   
    origin  /Users/merlyn/Projects/Git/Play/remote.git#master
    localhost:..Git/Play/local.git % cg-push
    WARNING: I guessed the host:path syntax was used and fell back to the git+ssh protocol.
    WARNING: The host:path syntax is evil because it is implicit. Please just use a URI.
    ssh: \033]2;[zsh] localhost: No address associated with nodename
    fatal: unexpected EOF
    localhost:..Git/Play/local.git % which cg-push
    /opt/git/bin/cg-push
    localhost:..Git/Play/local.git % grep uri $(which cg-push)
    uri=$(cat "$_git/branches/$name" 2>/dev/null) || die "unknown branch: $name"
    if echo "$uri" | grep -q '#'; then
            rembranch=$(echo $uri | cut -d '#' -f 2)
            uri=$(echo $uri | cut -d '#' -f 1)
    if [ "${uri#http://}" != "$uri" ]; then
    elif [ "${uri#git+ssh://}" != "$uri" ]; then
            send_pack_update "$name" "$(echo "$uri" | sed 's#^git+ssh://\([^/]*\)\(/.*\)$#\1:\2#')" $_git_head$sprembranch "${tags[@]}"
    elif [ "${uri#rsync://}" != "$uri" ]; then
    elif [ "${uri#*:}" != "$uri" ]; then
            send_pack_update "$name" "$uri" $_git_head$sprembranch "${tags[@]}"
            remgit="$uri"; [ -d "$remgit/.git" ] && remgit="$remgit/.git"
                    send_pack_update "$name" "$uri" $_git_head$sprembranch "${tags[@]}"
-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
Petr Baudis· Nov 28, 2005, 20:53 UTC · re: Randal L. Schwartz · lore

Re: lost again on syntax change - local repository?

Dear diary, on Mon, Nov 28, 2005 at 08:25:06PM CET, I got a letter where "Randal L. Schwartz" <merlyn@stonehenge.com> said that...

Show 5 quoted lines
>     localhost:..Git/Play/local.git % cg-push
>     WARNING: I guessed the host:path syntax was used and fell back to the git+ssh protocol.
>     WARNING: The host:path syntax is evil because it is implicit. Please just use a URI.
>     ssh: \033]2;[zsh] localhost: No address associated with nodename
>     fatal: unexpected EOF

Could you please strace it, to see what argument does git-send-pack take? (Or hijack git-send-pack if you cannot strace on your system.)

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
VI has two modes: the one in which it beeps and the one in which
it doesn't.

← back to recent threads