From: Junio C Hamano <gitster@pobox.com>
To: Andrew Keller <andrew@kellerfarm.com>
Cc: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
"Git List" <git@vger.kernel.org>
Subject: Re: Borrowing objects from nearby repositories
Date: Fri, 28 Mar 2014 10:02:31 -0700 [thread overview]
Message-ID: <xmqq8urucl3s.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <8030ADEA-B11F-47E8-AFE7-8F46E861F560@kellerfarm.com> (Andrew Keller's message of "Fri, 28 Mar 2014 10:52:20 -0400")
Andrew Keller <andrew@kellerfarm.com> writes:
> Okay, so to re-frame my idea, like you said, the goal is to find a user-
> friendly way for the user to tell git-clone to set up the alternates file
> (or perhaps just use the --alternates parameter), and run a repack,
> and disconnect the alternate. And yet, we still want to be able to use
> --reference on its own, because there are existing use cases for that.
Here are a few possible action items that came out of this
discussion:
1. Introduce a new "--borrow" option to "git clone".
The updates to the SYNOPSIS section may go like this:
-'git clone' [--reference <repository>] ...other options...
+'git clone' [[--reference|--borrow] <repository>] ...other options...
The new option can be used instead of "--reference" and they
will be mutually incompatible. The first implementation of the
"--borrow" option would do the following:
(1) run the same "git clone" with the same command line but
replacing "--borrow" with "--reference"; if this fails, exit
with the same failure.
(2) in the resulting repository, run "git repack -a -d"; if this
fails, remove the entire directory the first step created,
and exit with failure.
(3) remove .git/objects/info/alternates from the resulting
repository and exit with success.
and it may be acceptable as the final implementation as well.
2. Make "git repack" safer for the users of "clone --reference" who
want to keep sharing objects from the original.
- Introduce the "repack.local" configuration variable that can
be set to either true or false. Missing variable defaults to
"false".
- A "repack" that is run without "-l" option on the command line
will pretend as if it was given "-l" from the command line if
"repack.local" is set to "true". Add "repack --no-local"
option to countermand this configuration variable from the
command line.
- Teach "git clone --reference" (but not "git clone --borrow")
to set "repack.local = true" in the configuration of the
resulting repository.
prev parent reply other threads:[~2014-03-28 17:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-12 3:37 Borrowing objects from nearby repositories Andrew Keller
2014-03-23 18:04 ` Phil Hord
2014-03-24 21:21 ` Ævar Arnfjörð Bjarmason
2014-03-25 13:13 ` Andrew Keller
2014-03-25 17:02 ` Junio C Hamano
2014-03-25 22:17 ` Junio C Hamano
2014-03-26 13:36 ` Andrew Keller
2014-03-26 17:29 ` Junio C Hamano
2014-03-28 14:52 ` Andrew Keller
2014-03-28 17:02 ` Junio C Hamano [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=xmqq8urucl3s.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=andrew@kellerfarm.com \
--cc=avarab@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.
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).