[1.8.0] Recursively checkout, merge and reset populated submodules

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

 



Proposal:
When switching branches, merging or resetting the work tree of
populated submodules should be checked out too according to the
commit recorded in the superproject. Make this the default for
porcelain and optional for plumbing.

The same safety precautions that are used for files in the
superproject apply to the changes present in the submodules,
no local modifications may be overwritten unless -f is used.
When the "update" config option is set to "merge" or "rebase"
the submodule will be left unchanged.

The "update" config option will learn a new value "none" to let
the user turn off this behavior for single submodules. A global
config option and the command line parameter "--recurse-submodules"
will also be added. This change will remove the need to call "git
submodule update" for all populated submodules (except those who
use the "update=merge" or "update=rebase" configuration settings).

Advantages:
* This makes submodules behave like the files in the superproject.
  Every time the work tree of the superproject changes, the work
  trees of the populated submodules are updated accordingly.
* This is the least surprising behavior for new submodule users.

Risks:
The commands might run longer, for those users who use submodules
to gain performance by putting large and/or many files into
submodules this may be unacceptable. Also people might be
surprised by submodule work trees changing without explicitly
invoking "git submodule update". These commands will now fail in
the presence of changed submodules where they would have
succeeded before.

Migration plan:
Announce the change in behavior and document how to easily configure
the old behavior when needed and enable this functionality in 1.8.0.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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]