From: Junio C Hamano <gitster@pobox.com>
To: Stefan Beller <sbeller@google.com>
Cc: Jens.Lehmann@web.de, git@vger.kernel.org, mst@redhat.com
Subject: Re: [PATCHv2 5/6] submodule update: add super-reference flag
Date: Sat, 06 Aug 2016 10:13:42 -0700 [thread overview]
Message-ID: <xmqqh9axizw9.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20160806012318.17968-6-sbeller@google.com> (Stefan Beller's message of "Fri, 5 Aug 2016 18:23:17 -0700")
Stefan Beller <sbeller@google.com> writes:
> When we have a another clone of a superproject, we may want to
> mirror the submodules using alternates. Introduce an option
> `--super-reference` that let's a user point to another superproject,
> which is assumed to have the same structure as the one they are
> running the "submodule update" command from and has all submodules
> checked out to borrow the submodule objects from within the other
> superprojects git directory.
That's much better than the previous round.
I however have trouble with the "checked out", though. Isn't it
that it merely has to be "init"ed? For that matter, as long as
super.git has $GIT_DIR/modules/ populated fully, it does not matter
it has checkout, and more interestingly and importantly, the
superproject mirror can even be a bare repository!
> +--super-reference <superproject repository>::
> + This option is only valid for the update command. When update needs
> + to clone a repository, a reference will be passed to the clone command
> + that points at the submodule path inside the reference superproject.
"points at the submodule path inside" sounds as if we would look at
/var/cache/super/libs/xyzzy
in the scenario in <xmqqoa57vvzl.fsf@gitster.mtv.corp.google.com>,
when you give us "--super-reference=/var/cache/super". Can we
clarify to avoid such a misread?
> +superreference=
Please don't name a multiple_word field "multipleword".
> cached=
> recursive=
> init=
> @@ -520,6 +521,14 @@ cmd_update()
> --reference=*)
> reference="$1"
> ;;
> + --super-reference)
> + case "$2" in '') usage ;; esac
> + superreference="--super-reference=$2"
> + shift
> + ;;
> + --super-reference=*)
> + superreference="$1"
> + ;;
> -m|--merge)
> update="merge"
> ;;
> @@ -576,6 +585,7 @@ cmd_update()
> ${prefix:+--recursive-prefix "$prefix"} \
> ${update:+--update "$update"} \
> ${reference:+"$reference"} \
> + ${superreference:+"$superreference"} \
> ${depth:+--depth "$depth"} \
> ${recommend_shallow:+"$recommend_shallow"} \
> ${jobs:+$jobs} \
next prev parent reply other threads:[~2016-08-06 20:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-06 1:23 [PATCHv2 0/6] git clone: Marry --recursive and --reference Stefan Beller
2016-08-06 1:23 ` [PATCHv2 1/6] t7408: modernize style Stefan Beller
2016-08-06 1:23 ` [PATCHv2 2/6] t7408: merge short tests, factor out testing method Stefan Beller
2016-08-06 17:02 ` Junio C Hamano
2016-08-06 1:23 ` [PATCHv2 3/6] submodule--helper module-clone: allow multiple references Stefan Beller
2016-08-06 1:23 ` [PATCHv2 4/6] submodule--helper update-clone: " Stefan Beller
2016-08-06 17:05 ` Junio C Hamano
2016-08-06 1:23 ` [PATCHv2 5/6] submodule update: add super-reference flag Stefan Beller
2016-08-06 17:13 ` Junio C Hamano [this message]
2016-08-06 1:23 ` [PATCHv2 6/6] clone: reference flag is used for submodules as well Stefan Beller
2016-08-06 17:29 ` [PATCHv2 0/6] git clone: Marry --recursive and --reference Junio C Hamano
2016-08-08 18:16 ` Stefan Beller
-- strict thread matches above, loose matches on Subject: below --
2016-08-09 4:08 Stefan Beller
2016-08-09 4:08 ` [PATCHv2 5/6] submodule update: add super-reference flag Stefan Beller
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=xmqqh9axizw9.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=Jens.Lehmann@web.de \
--cc=git@vger.kernel.org \
--cc=mst@redhat.com \
--cc=sbeller@google.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).