9
9
class Submodule (object ):
10
10
"""
11
11
A Submodule is a named reference to a Commit on another Repo.
12
- Every Submodule instance contains a name and local and remote paths.
12
+ Every Submodule instance contains a name, a path into the local repo,
13
+ and a URI pointing at the remote repository.
13
14
14
15
Submodules are very close in behavior to HEAD pointer. It just sits on
15
16
top of a structure, in this case, at the end of folders tree, and says
@@ -37,16 +38,16 @@ def __init__(self, repo=None, id=None, mode=None, name='',
37
38
Pointer to Repo object instance.
38
39
'id'
39
40
Is the Sha of the commit on a remote server. This object does NOT
40
- (usually) exist on this, current repo.
41
+ (usually) exist in this repo.
41
42
'mode'
42
43
A black hole at this time. Trying to keep the input args
43
- similar between Tree, Blob and Subprocess instantiation classes.
44
+ similar between Tree, Blob and Submodule classes.
44
45
'name'
45
46
This is just the last segment in the submodule's full local path.
46
47
It's the name of the actual folder to which a submodule is tied.
47
48
'mode'
48
49
A black hole at this time. Trying to keep the input args
49
- similar between Tree, Blob and Subprocess instantiation classes.
50
+ similar between Tree, Blob and Submodule classes.
50
51
'commit_context'
51
52
A string with ID of the commit that was the root for the tree
52
53
structure that lead us to this folder (Tree object) that contains
@@ -57,9 +58,9 @@ def __init__(self, repo=None, id=None, mode=None, name='',
57
58
the parent folders we passed on the way from root of the commit to
58
59
this point in the folder tree.
59
60
Submodules in the .gitmodules are referenced by their full path
60
- and contents of this argument are used to retrieve the URI of the
61
+ and the contents of this argument is used to retrieve the URI of the
61
62
remote repo tied to this full local path.
62
- Example: "/ lib/vendor/vendors_repoA"
63
+ Example: "lib/vendor/vendors_repoA"
63
64
"""
64
65
self .repo = repo
65
66
self .id = id
0 commit comments