Skip to content

Commit 90d73cd

Browse files
committed
Some cleanup of Daniels contribution. Now it appears to be ready for a merge
1 parent 702f390 commit 90d73cd

File tree

4 files changed

+7
-93
lines changed

4 files changed

+7
-93
lines changed

lib/git/submodule.py

+7-6
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
class Submodule(object):
1010
"""
1111
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.
1314
1415
Submodules are very close in behavior to HEAD pointer. It just sits on
1516
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='',
3738
Pointer to Repo object instance.
3839
'id'
3940
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.
4142
'mode'
4243
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.
4445
'name'
4546
This is just the last segment in the submodule's full local path.
4647
It's the name of the actual folder to which a submodule is tied.
4748
'mode'
4849
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.
5051
'commit_context'
5152
A string with ID of the commit that was the root for the tree
5253
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='',
5758
the parent folders we passed on the way from root of the commit to
5859
this point in the folder tree.
5960
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
6162
remote repo tied to this full local path.
62-
Example: "/lib/vendor/vendors_repoA"
63+
Example: "lib/vendor/vendors_repoA"
6364
"""
6465
self.repo = repo
6566
self.id = id

test/git/.directory

-3
This file was deleted.

test/git/test_submodule.py

-9
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
import os.path
99
import sys
1010

11-
execpath = os.getcwd()
12-
sys.path.append(os.path.join(execpath, 'gitpython\lib'))
13-
1411
import unittest
1512
import tempfile
1613
import shutil
@@ -57,9 +54,3 @@ def test_submodule_attributes(self):
5754
self.assertEqual(t_s2.url, 'git://gitorious.org/git_http_backend_py/git_http_backend_py.git')
5855
self.assertEqual(tb_s2.url, 'git://gitorious.org/git_http_backend_py/git_http_backend_py.git')
5956

60-
if __name__ == "__main__":
61-
unittest.TextTestRunner(verbosity=2).run(
62-
unittest.TestSuite([
63-
unittest.TestLoader().loadTestsFromTestCase(TestSubmodule),
64-
])
65-
)

test_submodule.py

-75
This file was deleted.

0 commit comments

Comments
 (0)