Skip to content

Commit

Permalink
refactor: removed unused filename parameter from diff()
Browse files Browse the repository at this point in the history
  • Loading branch information
redimp committed Aug 13, 2024
1 parent af5bbd2 commit 008a562
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions otterwiki/gitstorage.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,9 @@ def revert(self, revision, message="", author=("","")):
actor = git.Actor(author[0], author[1])
self.repo.index.commit(message, author=actor)

def diff(self, filename, rev_a, rev_b):
def diff(self, rev_a, rev_b):
# https://docs.python.org/2/library/difflib.html
return self.repo.git.diff(rev_a, rev_b, filename)
return self.repo.git.diff(rev_a, rev_b)

def delete(self, filename, message=None, author=("","")):
if not type(filename) == list:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_gitstorage.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ def test_diff(storage):
# get revisions
rev_b, rev_a = log[0]["revision"], log[1]["revision"]
# get diff
diff = storage.diff(filename, rev_a, rev_b)
diff = storage.diff(rev_a, rev_b)
# check -/+ strings
assert "-aaa" in diff
assert "+bbb" in diff
Expand Down

0 comments on commit 008a562

Please sign in to comment.