git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: Jakub Narebski <jnareb@gmail.com>,
	Thomas Pasch <thomas.pasch@jentro.com>
Cc: git@vger.kernel.org
Subject: Re: some questions
Date: Fri, 22 Aug 2008 07:15:48 -0700	[thread overview]
Message-ID: <20080822141548.GD3483@spearce.org> (raw)
In-Reply-To: <m3bpzls8ld.fsf@localhost.localdomain>

Jakub Narebski <jnareb@gmail.com> wrote:
> Thomas Pasch <thomas.pasch@jentro.com> writes:
> 
> > I try to migrate our old cvs repo to git.
> > However, I still have to following questions
> > that I found difficult to answer with
> > the documentation.
> > 
> > - Is there a way to convert a indexVersion 1
> >   repo to indexVersion 2? (And vice versa?)
> 
> I think the only solution is to simply remove index,
> ensure configuration (pack.indexVersion), and recreate
> it using git-index-pack(1).

Just change pack.indexVersion in .git/config to have the version
you want and run `git gc` to repack the repository.  If you created
this repository by cloning another you may need to first delete
any .keep files:

	rm -f .git/objects/pack/*.keep
  
> > - Is there a way to find out if a repository
> >   is indexVersion 1 or indexVersion 2 (from
> >   the pack/index files)?
> 
> There is some magic number used to distinguish between
> pack index version 1 and version 2.
> 
> See Documentation/technical/pack-format.txt for details.

  for i in .git/objects/pack/pack-*.idx; do
  dd if=$i bs=12 count=1 | od -c
  done

A line like:

0000000   �   t   O   c  \0  \0  \0 002  \0  \0  \0 002

indicates index version 2, as it has the magic byte sequence in
front of '\xFFt0c'.  Most version 1 indexes will have 2 zeros
in the first two bytes:

0000000  \0  \0  \0  \0  \0  \0  \0 001  \0  \0  \0 003

> > - http for git seems to be read-only/fetch.
> >   Would it be (theoretically) possible to
> >   support write/push (with WebDAV or so)?
> 
> It *is* supported (via https).
> 
> There was even attempt to create 'smart' http
> push via web server module or CGI script, but
> IIRC it hit feature freeze and discussion petered
> out, so only parts of it are in 'pu'.
> 
> Search for "Add Git-aware CGI for Git-aware smart
> HTTP transport", "More on git over HTTP POST"
> 
>   http://thread.gmane.org/gmane.comp.version-control.git/91104

I'm picking this up again and working on it more.  Its not dead.
  
> > - What would be the implication to mount the
> >   git repo with nts (or another remote fs).
> >   Is it save to use such a mounted repo from
> >   more than one computer?

I've found that accessing a Git pack file over a network file
system like NFS or SMB is kinda slow.  The issue is we do many
reads scattered throughout the file.  Its hard for the client
to batch up reads and hide the network latency.

You may get better performance by building Git without mmap
support:

	make NO_MMAP=1

but that is going to hurt access to local files.

-- 
Shawn.

      reply	other threads:[~2008-08-22 14:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-22  7:31 some questions Thomas Pasch
2008-08-22  8:53 ` Matthieu Moy
2008-08-22 14:08   ` Shawn O. Pearce
2008-08-22  9:28 ` Jakub Narebski
2008-08-22 14:15   ` 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=20080822141548.GD3483@spearce.org \
    --to=spearce@spearce.org \
    --cc=git@vger.kernel.org \
    --cc=jnareb@gmail.com \
    --cc=thomas.pasch@jentro.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 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).