Thread (1 message) 1 message, 1 author, 2016-06-15

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:52

Jakub Narebski [off-list ref] 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                
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help