better tests, small cleanups

This commit is contained in:
Paul Gauthier 2023-08-18 09:43:40 -07:00
parent 95fb55b9d9
commit 752e47a886
3 changed files with 64 additions and 12 deletions

View file

@ -59,7 +59,9 @@ class GitRepo:
diff_args = []
if fnames:
diff_args += ["--"] + list(fnames)
dump(diff_args)
diffs = self.get_diffs(False, *diff_args)
dump(diffs)
commit_message = self.get_commit_message(diffs, context)
if not commit_message:
@ -134,6 +136,7 @@ class GitRepo:
if args:
if pretty:
args = ["--color"] + args
dump(args)
return self.repo.git.diff(*args)
# otherwise, we always want diffs of index and working dir