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

Re: [PATCH] gitweb: prepare for repositories with packed refs.

From
Petr Baudis <pasky@suse.cz>
Date
Oct 6, 2006, 15:40 UTC
Message-ID
<20061006154059.GQ20017@pasky.or.cz>
In-Reply-To
<7vsli5pwqf.fsf@assigned-by-dhcp.cox.net>

Dear diary, on Tue, Oct 03, 2006 at 11:36:08AM CEST, I got a letter where Junio C Hamano <junkio@cox.net> said that...

Show 6 quoted lines
> When a repository is initialized long time ago with symbolic
> HEAD, and "git-pack-refs --prune" is run, HEAD will be a
> dangling symlink to refs/heads/ somewhere.
> 
> Running -e "$dir/HEAD" to guess if $dir is a git repository does
> not give us the right answer anymore in such a case.

I think this is a wrong answer to this problem - I guess Cogito's going to be confused by HEAD a dangling symlink as well and I'll bet there's more places where this will give us trouble. Having HEAD a dangling symlink is just wrong and git-pack-refs --prune is buggy if it causes that.

  You should fix the problem at that side and make sure it either
changes HEAD to a symref or doesn't pack the ref HEAD points at. Or just
error out and leave the policy decision on the user.
-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)
Previous: Junio C HamanoNext: Junio C Hamano
Message 2 of 6 in “gitweb: prepare for repositories with packed refs.”
  1. gitweb: prepare for repositories with packed refs.Junio C Hamano, Oct 3, 2006
  2. Petr BaudisOct 6, 2006
  3. Junio C HamanoOct 7, 2006
  4. Petr BaudisOct 7, 2006
  5. Junio C HamanoOct 7, 2006
  6. Jakub NarebskiOct 7, 2006

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.