{"thread":{"id":"18431","subject":"git-push on packed refs via HTTP","startedAt":"2009-03-20T09:50:57Z","lastAt":"2009-03-27T10:20:36Z","messageCount":9,"participants":["Steve","Thomas Jarosch","Andreas Ericsson","Tay Ray Chuan","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"108684","messageId":"loom.20090320T094550-421@post.gmane.org","threadId":"18431","inReplyTo":null,"subject":"git-push on packed refs via HTTP","fromName":"Steve","fromEmail":"shrotty@gmx.ch","sentAt":"2009-03-20T09:50:57Z","receivedAt":"2009-03-20T09:50:57Z","isPatch":false,"sender":{"key":"shrotty@gmx.ch","avatar":null},"body":"Hi\n\nUsing HTTP as transport, I've noticed that after using git-gc on a git server, I\ncan't push to that repo anymore: \"No refs in common and none specified.\" Client\nand server are both 1.6.2. Is ths a bug or do I have to do something after\nexecuting git-gc on the server?\n\nThanks! Steve\n"},{"id":"108688","messageId":"200903201103.59907.thomas.jarosch@intra2net.com","threadId":"18431","inReplyTo":"loom.20090320T094550-421@post.gmane.org","subject":"Re: git-push on packed refs via HTTP","fromName":"Thomas Jarosch","fromEmail":"thomas.jarosch@intra2net.com","sentAt":"2009-03-20T10:03:59Z","receivedAt":"2009-03-20T10:03:59Z","isPatch":false,"sender":{"key":"thomas.jarosch@intra2net.com","avatar":"https://avatars.githubusercontent.com/u/1146758?v=4"},"body":"Hi Steve,\n\nOn Friday, 20. March 2009 10:50:57 you wrote:\n> Using HTTP as transport, I've noticed that after using git-gc on a git\n> server, I can't push to that repo anymore: \"No refs in common and none\n> specified.\" Client and server are both 1.6.2. Is ths a bug or do I have to\n> do something after executing git-gc on the server?\n\nCheck the permissions of the files on the server, I once accidentally executed\ngit commands as root user and the HTTP server was later\nunable to read/write the repository properly.\n\nThomas\n"},{"id":"108690","messageId":"loom.20090320T102357-212@post.gmane.org","threadId":"18431","inReplyTo":"200903201103.59907.thomas.jarosch@intra2net.com","subject":"Re: git-push on packed refs via HTTP","fromName":"Steve","fromEmail":"shrotty@gmx.ch","sentAt":"2009-03-20T10:25:27Z","receivedAt":"2009-03-20T10:25:27Z","isPatch":false,"sender":{"key":"shrotty@gmx.ch","avatar":null},"body":"Thomas Jarosch <thomas.jarosch <at> intra2net.com> writes:\n> Check the permissions of the files on the server, I once accidentally executed\n> git commands as root user and the HTTP server was later\n> unable to read/write the repository properly.\n\nThe perms are okay, yet the error message remains.\n"},{"id":"108694","messageId":"49C3721E.7000005@op5.se","threadId":"18431","inReplyTo":"loom.20090320T094550-421@post.gmane.org","subject":"Re: git-push on packed refs via HTTP","fromName":"Andreas Ericsson","fromEmail":"ae@op5.se","sentAt":"2009-03-20T10:38:22Z","receivedAt":"2009-03-20T10:38:22Z","isPatch":false,"sender":{"key":"ae@op5.se","avatar":"https://gravatar.com/avatar/426e89595c75a8f5252dd0c989e5fabe5bcac616e68557427ad9aef6b0ca342a?d=mp&s=160"},"body":"Steve wrote:\n> Hi\n> \n> Using HTTP as transport, I've noticed that after using git-gc on a git server, I\n> can't push to that repo anymore: \"No refs in common and none specified.\" Client\n> and server are both 1.6.2. Is ths a bug or do I have to do something after\n> executing git-gc on the server?\n> \n\nI had this happen once after having upgraded git on the server in question and\nthen running \"git gc\" against a repo. I didn't remove the old (not packed-refs\nknowing) git though, and when I later tried to push to it, it couldn't find\nany refs since the old receive-pack was being used, and it didn't know about\npacked refs.\n\nWorth checking, possibly.\n\n-- \nAndreas Ericsson                   andreas.ericsson@op5.se\nOP5 AB                             www.op5.se\nTel: +46 8-230225                  Fax: +46 8-230231\n\nConsidering the successes of the wars on alcohol, poverty, drugs and\nterror, I think we should give some serious thought to declaring war\non peace.\n"},{"id":"108695","messageId":"loom.20090320T104949-52@post.gmane.org","threadId":"18431","inReplyTo":"49C3721E.7000005@op5.se","subject":"Re: git-push on packed refs via HTTP","fromName":"Steve","fromEmail":"shrotty@gmx.ch","sentAt":"2009-03-20T10:50:48Z","receivedAt":"2009-03-20T10:50:48Z","isPatch":false,"sender":{"key":"shrotty@gmx.ch","avatar":null},"body":"> I had this happen once after having upgraded git on the server in question and\n> then running \"git gc\" against a repo. I didn't remove the old (not packed-refs\n> knowing) git though, and when I later tried to push to it, it couldn't find\n> any refs since the old receive-pack was being used, and it didn't know about\n> packed refs.\n\nWhich file/contents do I have to look for or remove in order to kick the old not\npacked refs?\n"},{"id":"108702","messageId":"be6fef0d0903200500u4d26d00fm653bc1e708a0c26b@mail.gmail.com","threadId":"18431","inReplyTo":"loom.20090320T094550-421@post.gmane.org","subject":"Re: git-push on packed refs via HTTP","fromName":"Tay Ray Chuan","fromEmail":"rctay89@gmail.com","sentAt":"2009-03-20T12:00:32Z","receivedAt":"2009-03-20T12:00:32Z","isPatch":false,"sender":{"key":"rctay89@gmail.com","avatar":"https://avatars.githubusercontent.com/u/61553?v=4"},"body":"Hi,\n\nOn Fri, Mar 20, 2009 at 5:50 PM, Steve <shrotty@gmx.ch> wrote:\n> Using HTTP as transport, I've noticed that after using git-gc on a git server, I\n> can't push to that repo anymore: \"No refs in common and none specified.\" Client\n> and server are both 1.6.2. Is ths a bug or do I have to do something after\n> executing git-gc on the server?\n\ncould you try running git update-server-info?\n\n-- \nCheers,\nRay Chuan\n"},{"id":"108703","messageId":"loom.20090320T123018-838@post.gmane.org","threadId":"18431","inReplyTo":"be6fef0d0903200500u4d26d00fm653bc1e708a0c26b@mail.gmail.com","subject":"Re: git-push on packed refs via HTTP","fromName":"Steve","fromEmail":"shrotty@gmx.ch","sentAt":"2009-03-20T12:31:04Z","receivedAt":"2009-03-20T12:31:04Z","isPatch":false,"sender":{"key":"shrotty@gmx.ch","avatar":null},"body":"> could you try running git update-server-info?\n\nForgot to mention that: I have tried git update-server-info, yet no luck.\n"},{"id":"108706","messageId":"alpine.DEB.1.00.0903201341220.6865@intel-tinevez-2-302","threadId":"18431","inReplyTo":"loom.20090320T123018-838@post.gmane.org","subject":"Re: git-push on packed refs via HTTP","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-03-20T12:45:08Z","receivedAt":"2009-03-20T12:45:08Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Fri, 20 Mar 2009, Steve wrote:\n\n> > could you try running git update-server-info?\n> \n> Forgot to mention that: I have tried git update-server-info, yet no \n> luck.\n\nActually, you have to undo the ref-packing performed by gc.  You can do it \nthis way (quick and dirty):\n\n\t$ git show-ref |\n\t  while read sha1 name\n\t  do\n\t\tmkdir -p .git/$(dirname $name) &&\n\t\techo $sha1 > .git/$name\n\t  done\n\nHth,\nDscho\n"},{"id":"109629","messageId":"loom.20090327T102017-250@post.gmane.org","threadId":"18431","inReplyTo":"alpine.DEB.1.00.0903201341220.6865@intel-tinevez-2-302","subject":"Re: git-push on packed refs via HTTP","fromName":"Steve","fromEmail":"shrotty@gmx.ch","sentAt":"2009-03-27T10:20:36Z","receivedAt":"2009-03-27T10:20:36Z","isPatch":false,"sender":{"key":"shrotty@gmx.ch","avatar":null},"body":"Hi Dscho\n\nThanks for your snippet, that did the trick. I only had to alter it slightly\nbecause the repo on the server is bare:\n\ngit show-ref |\nwhile read sha1 name\ndo\n  mkdir -p $(dirname $name) &&\n  echo $sha1 > $name\ndone\n\nJust for understanding: Why is this step necessary? Does it have anything to do\nwith serving the repo over HTTP at all?\n\nCheers, Steve\n"}]}