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

Re: StGIT 0.13 recognizes but not list packed StGIT controlled branches

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 19, 2007, 00:00 UTC
Message-ID
<7vpry7t88g.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<200711190005.49990.jnareb@gmail.com>
Jakub Narebski <jnareb@gmail.com> writes:
> So the question is: how to unpack branches, and how to prevent
> branches from being packed by "git-gc"?

I am afraid that is a wrong question. How long have we had the packed-refs anyway?

The question is "How to get the list of refs from a Porcelain if it wants to be compatible with GIT v1.4.4-rc1 (Nov 7, 2006) and later?", and the answer is for-each-ref.

Having said that, you could explode it by hand like this:
	git for-each-ref --format='%(objectname) %(refname)' refs/heads |
	while read sha1 refname
        do
        	test -f "$GIT_DIR/$refname" || 
               	git update-ref "$refname" "$sha1"
	done                
Previous: Jakub NarebskiNext: Catalin Marinas
Message 2 of 8 in “StGIT 0.13 recognizes but not list packed StGIT controlled branches”
  1. Jakub NarebskiNov 18, 2007
  2. Junio C HamanoNov 19, 2007
  3. Catalin MarinasNov 19, 2007
  4. Jakub NarebskiNov 19, 2007
  5. Catalin MarinasNov 19, 2007
  6. Jakub NarebskiNov 19, 2007
  7. Catalin MarinasNov 19, 2007
  8. Jakub NarebskiNov 19, 2007

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.