From: Eric Wong <normalperson@yhbt.net>
To: "Shawn O. Pearce" <spearce@spearce.org>
Cc: Jakub Narebski <jnareb@gmail.com>,
Bruno Cesar Ribas <ribas@c3sl.ufpr.br>,
git@vger.kernel.org
Subject: Re: Git / Subversion Interoperability
Date: Sat, 24 Mar 2007 13:38:13 -0700 [thread overview]
Message-ID: <20070324203813.GB25571@muzzle> (raw)
In-Reply-To: <20070324064556.GD25863@spearce.org>
"Shawn O. Pearce" <spearce@spearce.org> wrote:
> Jakub Narebski <jnareb@gmail.com> wrote:
> > Shawn O. Pearce wrote:
> >
> > > - Assigning repository-wide revision numbers. Git doesn't have
> > > such a concept, but its key to SVN. These would need to be stored
> > > in a file so the server can quickly map from revision number to
> > > Git commit SHA-1. The reflogs may help here, but currently they
> > > also expire. Any reflog that is being used to do this mapping
> > > cannot be expired, ever.
> >
> > Another idea is to use lightweight tags for that, especially now
> > with packed refs support in git.
>
> Yes, not a bad idea.
>
> Except the packed refs file can have variable sized records. It has
> no faster access path than to just scan it. Some SVN repositories
> have revision counts up into the 5 and 6 digits. These would take
> quite a while to scan, even as packed refs. ;-)
>
> I'm inclined to lean towards a really simple binary flat file holding
> just 20 byte SHA-1s, in "SVN order". Then its just a simple array
> index operation to locate the correct Git commit. And adding a
> new commit is really just an append to the end operation.
The rev_db implementation in git-svn is very similar to what you're
describing. However, I decided on 41-byte (SHA1 ascii + "\n") records
since it was easier to debug if any problems came up, and a ~50% size
reduction wasn't worth the potential headache (I already had a lot of
those from just dealing with SVN :).
The biggest weakness of fixed records is that tags or sparsely worked on
branches waste a lot of disk space, but it hasn't been a huge problem
for me.
--
Eric Wong
next prev parent reply other threads:[~2007-03-24 20:38 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-22 22:48 Git / Subversion Interoperability Bruno Cesar Ribas
2007-03-23 0:43 ` Shawn O. Pearce
2007-03-23 1:03 ` Julian Phillips
2007-03-23 1:24 ` Shawn O. Pearce
2007-03-23 1:36 ` Julian Phillips
2007-03-23 10:34 ` Karl Hasselström
2007-03-23 15:21 ` Bruno Cesar Ribas
2007-03-23 15:48 ` Karl Hasselström
2007-03-23 18:13 ` Julian Phillips
2007-03-23 19:34 ` Bruno Cesar Ribas
2007-03-23 22:05 ` David Lang
2007-03-23 22:11 ` Daniel Barkalow
2007-03-24 6:41 ` Shawn O. Pearce
2007-03-24 18:55 ` Karl Hasselström
2007-03-24 20:13 ` Linus Torvalds
2007-03-24 20:37 ` Junio C Hamano
2007-03-26 3:06 ` Sam Vilain
2007-03-23 21:30 ` Christian Wiese
2007-03-23 22:00 ` Steven Grimm
2007-03-24 6:56 ` Shawn O. Pearce
2007-03-26 3:04 ` Sam Vilain
2007-03-23 14:21 ` Jakub Narebski
2007-03-24 6:45 ` Shawn O. Pearce
2007-03-24 20:38 ` Eric Wong [this message]
2007-03-24 20:31 ` Eric Wong
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=20070324203813.GB25571@muzzle \
--to=normalperson@yhbt.net \
--cc=git@vger.kernel.org \
--cc=jnareb@gmail.com \
--cc=ribas@c3sl.ufpr.br \
--cc=spearce@spearce.org \
/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 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).