git@vger.kernel.org mailing list mirror (one of many)
 help / Atom feed
From: Casey Fitzpatrick <kcghost@gmail.com>
To: Stefan Beller <sbeller@google.com>, avarab@gmail.com
Cc: git <git@vger.kernel.org>
Subject: Re: git-submodule is missing --dissociate option
Date: Mon, 30 Apr 2018 17:39:31 -0400
Message-ID: <CAEp-SHV4hP=v_=AJExRS3hqT-x9rXEONofWD=sVQZC79uewATA@mail.gmail.com> (raw)
In-Reply-To: <CAGZ79kZQ3ce8QTJy2Siiuoz=pa6qWweNc8GTpoygkvKuoFXaAA@mail.gmail.com>

Sure, I'll take a crack at it and submit a patch.

On Mon, Apr 30, 2018 at 2:19 PM, Stefan Beller <sbeller@google.com> wrote:
> On Mon, Apr 30, 2018 at 1:29 AM, Casey Fitzpatrick <kcghost@gmail.com> wrote:
>> This seems to be a hole in the git feature set. I believe it is fairly
>> easily worked around, but it would be best to provide the option for
>> ease of use (and maybe performance?).
>>
>> git clone has both a --reference feature and a --dissociate option,
>> with dissociate allowing for a reference to *only* speed up network
>> transfers rather than have the resulting clone rely upon the reference
>> always being there (creates an independent repo).
>
> With the advent of git-worktree, I claim that --reference without further
> --dissociate is dangerous, such that the combination of these two are
> not the best UX, you could wish for.
>
>> But git submodule only allows for --reference, so there isn't a an
>> option to make a speedy independent submodule clone in one shot:
>> https://git-scm.com/docs/git-submodule
>> I checked the latest online documentation (currently at 2.16.3) and
>> the documentation in the latest sources (almost 2.18):
>> https://github.com/git/git/blob/next/Documentation/git-submodule.txt
>>
>> As far as I am aware this can be worked around with 'git repack -a'
>> and manual removal of the objects/info/alternates file afterward.
>> Though I don't know if this results in a less speedy clone than
>> dissociate would.
>
> That is an interesting workaround!
> I agree we should have the --dissociate option available for submodules.
> Care to implement it?
>
> Thanks,
> Stefan

  reply index

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-30  8:29 Casey Fitzpatrick
2018-04-30 11:30 ` Casey Fitzpatrick
2018-04-30 13:16   ` Ævar Arnfjörð Bjarmason
2018-05-02  4:32     ` Junio C Hamano
2018-04-30 18:19 ` Stefan Beller
2018-04-30 21:39   ` Casey Fitzpatrick [this message]
2018-05-01 18:09     ` [PATCH 0/2] Add --progress and --dissociate to git submodule Casey Fitzpatrick
2018-05-01 18:09       ` [PATCH 1/2] submodule: Add --progress option to add command Casey Fitzpatrick
2018-05-01 18:41         ` Stefan Beller
2018-05-01 20:48           ` Casey Fitzpatrick
2018-05-01 18:09       ` [PATCH 2/2] submodule: Add --dissociate option to add/update commands Casey Fitzpatrick
2018-05-01 20:23         ` Stefan Beller
2018-05-01 20:25         ` Eric Sunshine
2018-05-01 21:21           ` Casey Fitzpatrick
2018-05-01 18:20       ` [PATCH 0/2] Add --progress and --dissociate to git submodule Stefan Beller
2018-05-02  0:27     ` [PATCH 0/3] " Casey Fitzpatrick
2018-05-02  0:27       ` [PATCH 1/3] submodule: clean up subsititions in script Casey Fitzpatrick
2018-05-02  0:27       ` [PATCH 2/3] submodule: add --progress option to add command Casey Fitzpatrick
2018-05-02  0:27       ` [PATCH 3/3] submodule: add --dissociate option to add/update commands Casey Fitzpatrick
2018-05-02  0:40         ` Casey Fitzpatrick
2018-05-02  0:55     ` [PATCH 0/3] Add --progress and --dissociate to git submodule Casey Fitzpatrick
2018-05-02  0:55       ` [PATCH 1/3] submodule: clean up subsititions in script Casey Fitzpatrick
2018-05-02  5:59         ` Junio C Hamano
2018-05-03 10:46           ` Casey Fitzpatrick
2018-05-02  0:55       ` [PATCH 2/3] submodule: add --progress option to add command Casey Fitzpatrick
2018-05-02  0:55       ` [PATCH 3/3] submodule: add --dissociate option to add/update commands Casey Fitzpatrick
2018-05-02  4:37       ` [PATCH 0/3] Add --progress and --dissociate to git submodule Junio C Hamano
2018-05-02  8:54         ` Casey Fitzpatrick
2018-05-02  4:34   ` git-submodule is missing --dissociate option Junio C Hamano

Reply instructions:

You may reply publically 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='CAEp-SHV4hP=v_=AJExRS3hqT-x9rXEONofWD=sVQZC79uewATA@mail.gmail.com' \
    --to=kcghost@gmail.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --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

git@vger.kernel.org mailing list mirror (one of many)

Archives are clonable:
	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://ou63pmih66umazou.onion/inbox.comp.version-control.git
	nntp://czquwvybam4bgbro.onion/inbox.comp.version-control.git
	nntp://hjrcffqmbrq6wope.onion/inbox.comp.version-control.git
	nntp://news.gmane.org/gmane.comp.version-control.git

 note: .onion URLs require Tor: https://www.torproject.org/
       or Tor2web: https://www.tor2web.org/

AGPL code for this site: git clone https://public-inbox.org/ public-inbox