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
Expand file treeCollapse file tree
Open diff view settings
Collapse file
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 number | Diff line number | Diff line change |
|---|
@@ -413,7 +413,7 @@ If you obtained your submodule object by traversing a tree object which is not r |
413 | 413 | you have to inform the submodule about its actual commit to retrieve the data from |
414 | 414 | by using the ``set_parent_commit(...)`` method. |
415 | 415 |
|
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. |
417 | 417 |
|
418 | 418 | 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. |
419 | 419 |
|
@@ -545,4 +545,3 @@ And even more ... |
545 | 545 | 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. |
546 | 546 |
|
547 | 547 | Check the unit tests for an in-depth introduction on how each function is supposed to be used. |
548 | | - |
Collapse file
Copy file name to clipboardExpand all lines: git/objects/submodule/root.py +4-2Lines changed: 4 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -43,9 +43,11 @@ class RootUpdateProgress(UpdateProgress): |
43 | 43 |
|
44 | 44 |
|
45 | 45 | class RootModule(Submodule): |
| 46 | + """A (virtual) root of all submodules in the given repository. |
46 | 47 |
|
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 | + """ |
49 | 51 |
|
50 | 52 | __slots__ = () |
51 | 53 |
|
|