From: "Shawn O. Pearce" <spearce@spearce.org>
To: Mike Gaffney <mr.gaffo@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: update-server-info logic
Date: Tue, 28 Apr 2009 08:39:11 -0700 [thread overview]
Message-ID: <20090428153911.GR23604@spearce.org> (raw)
In-Reply-To: <49F720BC.9080604@gmail.com>
Mike Gaffney <mr.gaffo@gmail.com> wrote:
> I was wondering if someone could reply with a quick rundown of the
> update-server-info logic. I'm looking at implementing it in JGit and
> wanted to make sure I had it correct.
Its two things:
* rewrite $GIT_DIR/info/refs to be a complete catalog of all refs.
IIRC this format is one ref per line, sorted by the full ref name,
with the line format being "$SHA1\t$NAME\n".
Most of this is already implemented in RefWriter.
See writeInfoRefs().
* rewrite $GIT_DIR/objects/info/packs to be a complete catalog of the
packs in $GIT_DIR/objects/pack. The format is one pack per line,
written as "P pack-$HASH.pack\n". A final blank line is written
on the end of the file, for I don't know why. Its a good idea to
sort the lines by the last modified date of the pack, descending,
as clients will evaulate the file in order when searching for a
missing object, and the usually need the more recent pack first.
Most of this is already implemented in WalkRemoteObjectDatabase.
See writeInfoPacks().
--
Shawn.
prev parent reply other threads:[~2009-04-28 15:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-28 15:29 update-server-info logic Mike Gaffney
2009-04-28 15:39 ` Shawn O. Pearce [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090428153911.GR23604@spearce.org \
--to=spearce@spearce.org \
--cc=git@vger.kernel.org \
--cc=mr.gaffo@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.