From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Jon Jensen <jon@endpoint.com>,
git@vger.kernel.org
Subject: Re: How to stop sharing objects between repositories
Date: Sun, 16 Aug 2009 12:16:22 -0700 [thread overview]
Message-ID: <7vmy5z603d.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <20090816135703.GA31638@coredump.intra.peff.net> (Jeff King's message of "Sun\, 16 Aug 2009 09\:57\:03 -0400")
Jeff King <peff@peff.net> writes:
> Subject: [PATCH] docs: mention how to break alternates dependency
>
> A user who has created a repository dependency by using "git
> clone -s" does not necessarily know where to look to find
> out how to break that dependency. Let's mention it right
> under "-s", where they are most likely to find it.
>
> Signed-off-by: Jeff King <peff@peff.net>
> ---
> Documentation/git-clone.txt | 5 +++++
> 1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt
> index b14de6c..87fa687 100644
> --- a/Documentation/git-clone.txt
> +++ b/Documentation/git-clone.txt
> @@ -72,6 +72,11 @@ These objects may be removed by normal git operations (such as 'git-commit')
> which automatically call `git gc --auto`. (See linkgit:git-gc[1].)
> If these objects are removed and were referenced by the cloned repository,
> then the cloned repository will become corrupt.
> ++
> +To break the dependency of the cloned repository to the source
> +repository, run `git repack -a` in the cloned repository, which will
> +create a new pack in that repository with all referenced objects,
> +including those in the source repository.
After reading this, two points come to my mind. They may or may not be
issues.
(1) Such a user does not necessarily know a casual "git repack -a" breaks
the dependency, defeating the -s option s/he deliberately used in
order to save disk space in the first place. Perhaps we can reword
this further to kill two penguins with a single stone?
Note that the pack resulting from running `git repack -a` in the
repository cloned with the `-s` option will include objects that
are borrowed from the source repository. It essentially breaks
the dependency created by cloning with the `-s` option by copying
the objects from the source repository. To keep borrowing from
the source repository to save disk space, do not use `repack -a`.
We should suggest an alternative immediately after this sentence,
e.g. "Instead, use `repack -l`" or something, but somebody should
check if it is a valid/viable alternative.
(2) IIRC, "git gc --auto" runs "repack -A". What is its effect with
respect to this dependency between object stores? I suspect it would
also break the dependency, but if so, is it a good thing? Perhaps
should we change it to use a version that keeps the dependency
instead?
next prev parent reply other threads:[~2009-08-16 19:16 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-16 0:04 How to stop sharing objects between repositories Jon Jensen
2009-08-16 8:43 ` Johannes Schindelin
2009-08-16 12:28 ` Jeff King
2009-08-16 12:30 ` Johannes Schindelin
2009-08-16 13:54 ` Daniel Villeneuve
2009-08-16 13:57 ` Johannes Schindelin
2009-08-16 13:57 ` Jeff King
2009-08-16 19:16 ` Junio C Hamano [this message]
2009-08-17 2:21 ` Mike Galbraith
2009-08-17 6:48 ` Jeff King
2009-08-17 7:12 ` Mike Galbraith
2009-08-17 7:24 ` Junio C Hamano
2009-08-17 7:25 ` Jeff King
2009-08-17 7:35 ` Junio C Hamano
2009-08-17 7:50 ` Jeff King
2009-08-17 6:19 ` Jeff King
2009-08-17 6:32 ` Jeff King
2009-08-17 6:31 ` Jeff King
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=7vmy5z603d.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=jon@endpoint.com \
--cc=peff@peff.net \
/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