git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Andreas Krey <a.krey@gmx.de>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: clone, hardlinks, and file modes (and CAP_FOWNER)
Date: Fri, 24 Aug 2018 21:59:05 +0200	[thread overview]
Message-ID: <20180824195905.GA19781@inner.h.apk.li> (raw)
In-Reply-To: <87tvnjes6y.fsf@evledraar.gmail.com>

On Fri, 24 Aug 2018 16:48:37 +0000, Ævar Arnfjörð Bjarmason wrote:
...
> I don't understand how this hardlink approach would work (doesn't mean
> it won't, just that I don't get it).

I just detect whether there is insufficient sharing (df is quite handy
here; 'df this/.git that/.git' tells the unshared part of that/.git only).

When I detect 'unsharedness', I just hardlink the biggest .pack and the
corresponding .idx into the target repo, create a .keep file for that,
run 'git gc', and remove the .keep file. Effect: repack uses the .kept
file and only creates a small additional pack file for the remaining
objects, thus the biggest part of the objects are now shared between
the cache and the target repo.

This is going to be run once a week over all the repos on a machine
(that were created by our tooling and thus have known locations),
to avoid eventual repacks of repos to gradually and completely
lose the sharedness of the objects/packs.

> If you have such a tightly coupled approach isn't --reference closed to
> what you want in that case?

Close, but not. --reference et al. all need the promise that the
referenced repo isn't going away, and I don't want to rely on this
(if someone thinks he can drop the cache this should not lead to
breakage in the work repos).

- Andreas

-- 
"Totally trivial. Famous last words."
From: Linus Torvalds <torvalds@*.org>
Date: Fri, 22 Jan 2010 07:29:21 -0800

      reply	other threads:[~2018-08-24 19:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-24 12:14 clone, hardlinks, and file modes (and CAP_FOWNER) Andreas Krey
2018-08-24 14:48 ` Ævar Arnfjörð Bjarmason
2018-08-24 19:59   ` Andreas Krey [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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180824195905.GA19781@inner.h.apk.li \
    --to=a.krey@gmx.de \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).