{"thread":{"id":"19109","subject":"update-server-info logic","startedAt":"2009-04-28T15:29:00Z","lastAt":"2009-04-28T15:39:11Z","messageCount":2,"participants":["Mike Gaffney","Shawn O. Pearce"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"112537","messageId":"49F720BC.9080604@gmail.com","threadId":"19109","inReplyTo":null,"subject":"update-server-info logic","fromName":"Mike Gaffney","fromEmail":"mr.gaffo@gmail.com","sentAt":"2009-04-28T15:29:00Z","receivedAt":"2009-04-28T15:29:00Z","isPatch":false,"sender":{"key":"mr.gaffo@gmail.com","avatar":"https://gravatar.com/avatar/5af46a60cbd83f2ddb0c2cf4d02b91db42fd25e2ac568ff0d71f699d852ee79d?d=mp&s=160"},"body":"Folks,\n    I was wondering if someone could reply with a quick rundown of the \nupdate-server-info logic. I'm looking at implementing it in JGit and \nwanted to make sure I had it correct.\n\n-Mike\n"},{"id":"112538","messageId":"20090428153911.GR23604@spearce.org","threadId":"19109","inReplyTo":"49F720BC.9080604@gmail.com","subject":"Re: update-server-info logic","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2009-04-28T15:39:11Z","receivedAt":"2009-04-28T15:39:11Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Mike Gaffney <mr.gaffo@gmail.com> wrote:\n>    I was wondering if someone could reply with a quick rundown of the  \n> update-server-info logic. I'm looking at implementing it in JGit and  \n> wanted to make sure I had it correct.\n\nIts two things:\n\n* rewrite $GIT_DIR/info/refs to be a complete catalog of all refs.\n  IIRC this format is one ref per line, sorted by the full ref name,\n  with the line format being \"$SHA1\\t$NAME\\n\".\n\n  Most of this is already implemented in RefWriter.\n  See writeInfoRefs().\n\n* rewrite $GIT_DIR/objects/info/packs to be a complete catalog of the\n  packs in $GIT_DIR/objects/pack.  The format is one pack per line,\n  written as \"P pack-$HASH.pack\\n\".  A final blank line is written\n  on the end of the file, for I don't know why.  Its a good idea to\n  sort the lines by the last modified date of the pack, descending,\n  as clients will evaulate the file in order when searching for a\n  missing object, and the usually need the more recent pack first.\n\n  Most of this is already implemented in WalkRemoteObjectDatabase.\n  See writeInfoPacks().\n\n-- \nShawn.\n"}]}