* update-server-info logic
@ 2009-04-28 15:29 Mike Gaffney
2009-04-28 15:39 ` Shawn O. Pearce
0 siblings, 1 reply; 2+ messages in thread
From: Mike Gaffney @ 2009-04-28 15:29 UTC (permalink / raw)
To: git
Folks,
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.
-Mike
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: update-server-info logic
2009-04-28 15:29 update-server-info logic Mike Gaffney
@ 2009-04-28 15:39 ` Shawn O. Pearce
0 siblings, 0 replies; 2+ messages in thread
From: Shawn O. Pearce @ 2009-04-28 15:39 UTC (permalink / raw)
To: Mike Gaffney; +Cc: git
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-04-28 15:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-28 15:29 update-server-info logic Mike Gaffney
2009-04-28 15:39 ` Shawn O. Pearce
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).