git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git-push on packed refs via HTTP
@ 2009-03-20  9:50 Steve
  2009-03-20 10:03 ` Thomas Jarosch
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Steve @ 2009-03-20  9:50 UTC (permalink / raw)
  To: git

Hi

Using HTTP as transport, I've noticed that after using git-gc on a git server, I
can't push to that repo anymore: "No refs in common and none specified." Client
and server are both 1.6.2. Is ths a bug or do I have to do something after
executing git-gc on the server?

Thanks! Steve

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: git-push on packed refs via HTTP
  2009-03-20  9:50 git-push on packed refs via HTTP Steve
@ 2009-03-20 10:03 ` Thomas Jarosch
  2009-03-20 10:25   ` Steve
  2009-03-20 10:38 ` Andreas Ericsson
  2009-03-20 12:00 ` Tay Ray Chuan
  2 siblings, 1 reply; 9+ messages in thread
From: Thomas Jarosch @ 2009-03-20 10:03 UTC (permalink / raw)
  To: git; +Cc: Steve

Hi Steve,

On Friday, 20. March 2009 10:50:57 you wrote:
> Using HTTP as transport, I've noticed that after using git-gc on a git
> server, I can't push to that repo anymore: "No refs in common and none
> specified." Client and server are both 1.6.2. Is ths a bug or do I have to
> do something after executing git-gc on the server?

Check the permissions of the files on the server, I once accidentally executed
git commands as root user and the HTTP server was later
unable to read/write the repository properly.

Thomas

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: git-push on packed refs via HTTP
  2009-03-20 10:03 ` Thomas Jarosch
@ 2009-03-20 10:25   ` Steve
  0 siblings, 0 replies; 9+ messages in thread
From: Steve @ 2009-03-20 10:25 UTC (permalink / raw)
  To: git

Thomas Jarosch <thomas.jarosch <at> intra2net.com> writes:
> Check the permissions of the files on the server, I once accidentally executed
> git commands as root user and the HTTP server was later
> unable to read/write the repository properly.

The perms are okay, yet the error message remains.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: git-push on packed refs via HTTP
  2009-03-20  9:50 git-push on packed refs via HTTP Steve
  2009-03-20 10:03 ` Thomas Jarosch
@ 2009-03-20 10:38 ` Andreas Ericsson
  2009-03-20 10:50   ` Steve
  2009-03-20 12:00 ` Tay Ray Chuan
  2 siblings, 1 reply; 9+ messages in thread
From: Andreas Ericsson @ 2009-03-20 10:38 UTC (permalink / raw)
  To: Steve; +Cc: git

Steve wrote:
> Hi
> 
> Using HTTP as transport, I've noticed that after using git-gc on a git server, I
> can't push to that repo anymore: "No refs in common and none specified." Client
> and server are both 1.6.2. Is ths a bug or do I have to do something after
> executing git-gc on the server?
> 

I had this happen once after having upgraded git on the server in question and
then running "git gc" against a repo. I didn't remove the old (not packed-refs
knowing) git though, and when I later tried to push to it, it couldn't find
any refs since the old receive-pack was being used, and it didn't know about
packed refs.

Worth checking, possibly.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: git-push on packed refs via HTTP
  2009-03-20 10:38 ` Andreas Ericsson
@ 2009-03-20 10:50   ` Steve
  0 siblings, 0 replies; 9+ messages in thread
From: Steve @ 2009-03-20 10:50 UTC (permalink / raw)
  To: git

> I had this happen once after having upgraded git on the server in question and
> then running "git gc" against a repo. I didn't remove the old (not packed-refs
> knowing) git though, and when I later tried to push to it, it couldn't find
> any refs since the old receive-pack was being used, and it didn't know about
> packed refs.

Which file/contents do I have to look for or remove in order to kick the old not
packed refs?

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: git-push on packed refs via HTTP
  2009-03-20  9:50 git-push on packed refs via HTTP Steve
  2009-03-20 10:03 ` Thomas Jarosch
  2009-03-20 10:38 ` Andreas Ericsson
@ 2009-03-20 12:00 ` Tay Ray Chuan
  2009-03-20 12:31   ` Steve
  2 siblings, 1 reply; 9+ messages in thread
From: Tay Ray Chuan @ 2009-03-20 12:00 UTC (permalink / raw)
  To: Steve; +Cc: git

Hi,

On Fri, Mar 20, 2009 at 5:50 PM, Steve <shrotty@gmx.ch> wrote:
> Using HTTP as transport, I've noticed that after using git-gc on a git server, I
> can't push to that repo anymore: "No refs in common and none specified." Client
> and server are both 1.6.2. Is ths a bug or do I have to do something after
> executing git-gc on the server?

could you try running git update-server-info?

-- 
Cheers,
Ray Chuan

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: git-push on packed refs via HTTP
  2009-03-20 12:00 ` Tay Ray Chuan
@ 2009-03-20 12:31   ` Steve
  2009-03-20 12:45     ` Johannes Schindelin
  0 siblings, 1 reply; 9+ messages in thread
From: Steve @ 2009-03-20 12:31 UTC (permalink / raw)
  To: git

> could you try running git update-server-info?

Forgot to mention that: I have tried git update-server-info, yet no luck.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: git-push on packed refs via HTTP
  2009-03-20 12:31   ` Steve
@ 2009-03-20 12:45     ` Johannes Schindelin
  2009-03-27 10:20       ` Steve
  0 siblings, 1 reply; 9+ messages in thread
From: Johannes Schindelin @ 2009-03-20 12:45 UTC (permalink / raw)
  To: Steve; +Cc: git

Hi,

On Fri, 20 Mar 2009, Steve wrote:

> > could you try running git update-server-info?
> 
> Forgot to mention that: I have tried git update-server-info, yet no 
> luck.

Actually, you have to undo the ref-packing performed by gc.  You can do it 
this way (quick and dirty):

	$ git show-ref |
	  while read sha1 name
	  do
		mkdir -p .git/$(dirname $name) &&
		echo $sha1 > .git/$name
	  done

Hth,
Dscho

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: git-push on packed refs via HTTP
  2009-03-20 12:45     ` Johannes Schindelin
@ 2009-03-27 10:20       ` Steve
  0 siblings, 0 replies; 9+ messages in thread
From: Steve @ 2009-03-27 10:20 UTC (permalink / raw)
  To: git

Hi Dscho

Thanks for your snippet, that did the trick. I only had to alter it slightly
because the repo on the server is bare:

git show-ref |
while read sha1 name
do
  mkdir -p $(dirname $name) &&
  echo $sha1 > $name
done

Just for understanding: Why is this step necessary? Does it have anything to do
with serving the repo over HTTP at all?

Cheers, Steve

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-03-27 10:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-20  9:50 git-push on packed refs via HTTP Steve
2009-03-20 10:03 ` Thomas Jarosch
2009-03-20 10:25   ` Steve
2009-03-20 10:38 ` Andreas Ericsson
2009-03-20 10:50   ` Steve
2009-03-20 12:00 ` Tay Ray Chuan
2009-03-20 12:31   ` Steve
2009-03-20 12:45     ` Johannes Schindelin
2009-03-27 10:20       ` Steve

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).