Re: Fetch on submodule update

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi again,

Robert Dailey wrote:

> Problem: I want to avoid recursively fetching submodules when I run a
> `fetch` command, and instead defer that operation to the next
> `submodule update`. Essentially I want `fetch.recurseSubmodules` to be
> `false`, and `get submodule update` to do exactly what it does with
> the `--remote` option, but still use the SHA1 of the submodule instead
> of updating to the tip of the specified branch in the git modules
> config.

I think I misread this the first time.  I got distracted by your
mention of the --remote option, but you mentioned you want to use the
SHA-1 of the submodule listed, so that was silly of me.

I think you'll find that "git fetch --no-recurse-submodules" and "git
submodule update" do exactly what you want.  "git submodule update"
does perform a fetch (unless you pass --no-fetch).

Let me know how it goes. :)

I'd still be interested in hearing more about the nature of the
submodules involved --- maybe `submodule.fetchJobs` would help, or
maybe this is a workflow where a tool that transparently fetches
submodules on demand like
https://gerrit.googlesource.com/gitfs/+/master/docs/design.md would be
useful (I'm not recommending using slothfs for this today, since it's
read-only, but it illustrates the idea).

Thanks,
Jonathan



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux