git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: demerphq <demerphq@gmail.com>
To: Git <git@vger.kernel.org>
Subject: Dealing with many many git repos in a /home directory
Date: Thu, 4 Feb 2010 09:29:46 +0100	[thread overview]
Message-ID: <9b18b3111002040029x1c7de0afw4a5ef883588f7a18@mail.gmail.com> (raw)

At $work we have a host where we have about 50-100 users each with
their own private copies of the same repos. These are cloned froma
remote via git/ssh and are not thus automatically hardlinking their
object stores.

This is starting to take a lot of space.

I was thinking it should be possible to hardlink all of the objects in
the different repos to a canonical single copy.

Would i be correct in thinking that if i have to repos with an
equivalent  .git/objects/../..... file in them that the files are
necessarily identical and one can be replaced by a hardlink to the
other?

If this is correct then is there some tool known to the list that
already does this?  I whipped this together:

find /home -regex .\*/.git/objects/.\* | perl -lne'if
(m!(\.git/objects/../.+)!) { if (my $t= $seen{$1}) { link $t,$_ } else
{ $seen{$1}=$_ } }'

But a proper script with a sign off of some git dev would make me feel
a lot safer :-)

cheers,
Yves


-- 
perl -Mre=debug -e "/just|another|perl|hacker/"

             reply	other threads:[~2010-02-04  8:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-04  8:29 demerphq [this message]
2010-02-04  9:57 ` Dealing with many many git repos in a /home directory Alex Riesen
2010-02-04 15:20   ` Sergio
2010-02-04 15:00 ` Martin Langhoff
2010-02-04 15:32 ` Andreas Schwab
2010-02-04 17:35 ` Nicolas Pitre

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=9b18b3111002040029x1c7de0afw4a5ef883588f7a18@mail.gmail.com \
    --to=demerphq@gmail.com \
    --cc=git@vger.kernel.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).