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

Re: Corruption: empty refs/heads in otherwise filled repo: cannot clone?

From
JWJan Wielemaker <j.wielemaker@uva.nl>
Date
Jun 30, 2008, 19:46 UTC
Message-ID
<200806302146.23120.J.Wielemaker@uva.nl>
In-Reply-To
<alpine.LNX.1.00.0806301528500.19665@iabervon.org>
On Monday 30 June 2008 21:33:50 Daniel Barkalow wrote:
Show 22 quoted lines
> On Mon, 30 Jun 2008, Jan Wielemaker wrote:
> > On Monday 30 June 2008 14:03, Jakub Narebski wrote:
> > > Jan Wielemaker wrote:
> > > > Summarising, I think the conclusion is that git pack-refs has somehow
> > > > been run on this repository, and being a bare one this is not a
> > > > particulary good idea right now. I have the impression I should
> > > > `unpack' them by putting the appriate files in heads (done) and tags
> > > > (now still) and (re)move packed-refs.
> > >
> > > If you use new enough git both on server and on clients it should
> > > not have problems with packed-refs. I would rather check permissions
> > > of $GIT_DIR and $GIT_DIR/packed-refs.
> >
> > There is no permission problem, as a I proved by doing a recursive copy
> > of the whole repo (cp -a, no errors) and the problem prevails on the
> > copy. A serious scan for permission errors was my first step. Almost
> > looks like something in the environment, but I can't find anything weird
> > there either.
>
> That's a "cp -a" as somebody else, I assume? (If it were as you or root,
> you'd generate a copy of the repository with any permission problem
> unchanged, since -a includes -p.)

I'm an old time Unix guy :-). The failing user has a git-shell. I did (reconstructing from memory):

	% sudo -u failinguser /bin/bash
	<passwd>
	% Use whoami to validate I was this user
	% git clone /home/git/pl.git
	<failed (no remote branches)>
	% cp -a /home/git/pl.git tmp.git
	<ok, no errors>
	% git clone tmp.git
	<failed (no remote branches)>

Funny enough, as myself I can clone tmp.git!? I have only one git installation in /usr/local/bin.

	Cheers --- Jan
Previous: Daniel BarkalowNext: Björn Steinbrink
Message 9 of 10 in “Corruption: empty refs/heads in otherwise filled repo: cannot clone?”
  1. Jan WielemakerJun 30, 2008
  2. Jakub NarebskiJun 30, 2008
  3. Jan WielemakerJun 30, 2008
  4. Jakub NarebskiJun 30, 2008
  5. Jan WielemakerJun 30, 2008
  6. Jakub NarebskiJun 30, 2008
  7. Jan WielemakerJun 30, 2008
  8. Daniel BarkalowJun 30, 2008
  9. Jan WielemakerJun 30, 2008
  10. Björn SteinbrinkJun 30, 2008

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.