Skip to content

Commit

Permalink
Typing.
Browse files Browse the repository at this point in the history
  • Loading branch information
jelmer committed Jul 11, 2022
1 parent 3873ba7 commit 2832f4e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion dulwich/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,6 @@ def run(self, args):
sys.stdout.write(' %s %s\n' % (sha, path))



class cmd_tag(Command):
def run(self, args):
parser = optparse.OptionParser()
Expand Down
4 changes: 2 additions & 2 deletions dulwich/porcelain.py
Original file line number Diff line number Diff line change
Expand Up @@ -877,12 +877,12 @@ def submodule_add(repo, url, path=None, name=None):
"""
with open_repo_closing(repo) as r:
if path is None:
path = os.path.relpath(canonical_part(url), repo.path)
path = os.path.relpath(_canonical_part(url), r.path)
if name is None:
name = path

# TODO(jelmer): Move this logic to dulwich.submodule
gitmodules_path = os.path.join(repo.path, ".gitmodules")
gitmodules_path = os.path.join(r.path, ".gitmodules")
try:
config = ConfigFile.from_path(gitmodules_path)
except FileNotFoundError:
Expand Down
4 changes: 2 additions & 2 deletions dulwich/tests/test_porcelain.py
Original file line number Diff line number Diff line change
Expand Up @@ -1425,8 +1425,8 @@ def test_add(self):
with open('%s/.gitmodules' % self.repo.path, 'r') as f:
self.assertEqual("""\
[submodule "bar"]
url = ../bar.git
path = bar
\turl = ../bar.git
\tpath = bar
""", f.read())


Expand Down

0 comments on commit 2832f4e

Please sign in to comment.