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