git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Meeks <michael.meeks@novell.com>
To: Andres Freund <andres@anarazel.de>
Cc: Brian Gernhardt <benji@silverinsanity.com>,
	git@vger.kernel.org, kendy@novell.com,
	Norbert Thiebaud <nthiebaud@gmail.com>
Subject: copying git repositories ...
Date: Mon, 28 Feb 2011 14:25:02 +0000	[thread overview]
Message-ID: <1298903102.14697.127.camel@lenovo-w500> (raw)
In-Reply-To: <201102252155.13466.andres@anarazel.de>

Hi Andres & Brian,

	Thanks for your help;

On Fri, 2011-02-25 at 21:55 +0100, Andres Freund wrote:
> > On Tue, 2011-02-22 at 10:55 -0500, Brian Gernhardt wrote:
> > > FYI: `git clone foo bar` will use hard-links to copy the object
> > > files and is both very fast and space efficient.  (See the
> > > description of `--local` in git-clone(1), which is used by
> > > default for local repositories since git 1.5.3.)  It's also
> > > guaranteed to work while the correctness of `cp -lR` depends
> > > on implementation details of git.
..
> > 	Sounds like just what I need. Unfortunately, it didn't clone some of
> > the pieces I needed; eg. other configured remotes, I ended up with just
> > 'origin' - which was unexpected (and less wonderful than cp -lR ;-).
..
> See the --mirror option for clone

	I tried all of this; none of it did what I had hoped :-)

	git clone src dest

	yields a different repository, with a totally different config /
remotes setup - missing all but a new synthetic origin pointing at the
local files and which can't be git pulled from in the normal way; ie. it
behaves extremely differently to the cp -lR result.

	git clone --mirror src dest

	yields a similar problem-repository, which is for extra measure a bare
checkout, and thus also not what I need.

	I'm really looking for an equivalent of 'cp -lR foo baa' that:

	* uses hard links to save space
	* produces precisely-a-duplicate repository

	For #2 - I would use the verb 'clone' except of course the 'clone' I'm
talking about would be one that is identical, the same, with no
differences (not eg. missing a few limbs ;-) 

	Clearly cp -lR is bad & evil and all that; but it yields exactly what I
need to effectively manage my local trees, multiple checkouts, and
different builds without burning the entire disk.

	Is there a blessed 'cp -lR' wrapper for git that is functionally
identical ? [ and I'm happy of course for some slow divergence, and loss
of efficiency as I pull more changes from time to time into each tree ].

	Sorry for the noise,

		Michael.

-- 
 michael.meeks@novell.com  <><, Pseudo Engineer, itinerant idiot

  reply	other threads:[~2011-02-28 14:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-22 15:34 libreoffice merge(tool?) issue #3 Michael Meeks
2011-02-22 15:55 ` Brian Gernhardt
2011-02-24 16:39   ` libreoffice merge(tool?) issue #3 ... (bogus) Michael Meeks
2011-02-25 10:08     ` Michael J Gruber
2011-02-25 20:55     ` Andres Freund
2011-02-28 14:25       ` Michael Meeks [this message]
2011-02-28 15:03         ` copying git repositories Andres Freund
2011-02-28 15:10         ` Brian Gernhardt
2011-02-22 17:30 ` libreoffice merge(tool?) issue #3 Michael J Gruber
2011-02-22 18:14   ` Michael Meeks
2011-02-23 11:18     ` Michael J Gruber
2011-02-23 13:22       ` Michael J Gruber

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=1298903102.14697.127.camel@lenovo-w500 \
    --to=michael.meeks@novell.com \
    --cc=andres@anarazel.de \
    --cc=benji@silverinsanity.com \
    --cc=git@vger.kernel.org \
    --cc=kendy@novell.com \
    --cc=nthiebaud@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 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).