GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Clarify "master repository" in RootModule docs · gitpython-developers/GitPython@f95d4fd

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • doc/source
    • tutorial.rst
  • git/objects/submodule
    • root.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎doc/source/tutorial.rst‎

Copy file name to clipboardExpand all lines: doc/source/tutorial.rst
+1-2Lines changed: 1 addition & 2 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ If you obtained your submodule object by traversing a tree object which is not r
413413
you have to inform the submodule about its actual commit to retrieve the data from
414414
by using the ``set_parent_commit(...)`` method.
415415

416-
The special :class:`RootModule <git.objects.submodule.root.RootModule>` type allows you to treat your master repository as root of a hierarchy of submodules, which allows very convenient submodule handling. Its ``update(...)`` method is reimplemented to provide an advanced way of updating submodules as they change their values over time. The update method will track changes and make sure your working tree and submodule checkouts stay consistent, which is very useful in case submodules get deleted or added to name just two of the handled cases.
416+
The special :class:`RootModule <git.objects.submodule.root.RootModule>` type allows you to treat your superproject (master repository) as root of a hierarchy of submodules, which allows very convenient submodule handling. Its ``update(...)`` method is reimplemented to provide an advanced way of updating submodules as they change their values over time. The update method will track changes and make sure your working tree and submodule checkouts stay consistent, which is very useful in case submodules get deleted or added to name just two of the handled cases.
417417

418418
Additionally, GitPython adds functionality to track a specific branch, instead of just a commit. Supported by customized update methods, you are able to automatically update submodules to the latest revision available in the remote repository, as well as to keep track of changes and movements of these submodules. To use it, set the name of the branch you want to track to the ``submodule.$name.branch`` option of the *.gitmodules* file, and use GitPython update methods on the resulting repository with the ``to_latest_revision`` parameter turned on. In the latter case, the sha of your submodule will be ignored, instead a local tracking branch will be updated to the respective remote branch automatically, provided there are no local changes. The resulting behaviour is much like the one of svn::externals, which can be useful in times.
419419

@@ -545,4 +545,3 @@ And even more ...
545545
There is more functionality in there, like the ability to archive repositories, get stats and logs, blame, and probably a few other things that were not mentioned here.
546546

547547
Check the unit tests for an in-depth introduction on how each function is supposed to be used.
548-
Collapse file

‎git/objects/submodule/root.py‎

Copy file name to clipboardExpand all lines: git/objects/submodule/root.py
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,11 @@ class RootUpdateProgress(UpdateProgress):
4343

4444

4545
class RootModule(Submodule):
46+
"""A (virtual) root of all submodules in the given repository.
4647
47-
"""A (virtual) Root of all submodules in the given repository. It can be used
48-
to more easily traverse all submodules of the master repository"""
48+
This can be used to more easily traverse all submodules of the
49+
superproject (master repository).
50+
"""
4951

5052
__slots__ = ()
5153

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.