Skip to content

Commit

Permalink
Limit diff to ~10 lines
Browse files Browse the repository at this point in the history
Also include content of added files.
  • Loading branch information
bwarden committed Apr 16, 2024
1 parent 16ee88c commit 239d8cd
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions autospec/tarball.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,5 +446,8 @@ def process(self, filemanager):
autogenerated_src.extract(os.path.join(self.base_path, 'autogenerated-tmp'))
# Move the autogenerated source to a non-version-named directory for consistent diffs
call(f"mv autogenerated-tmp/{autogenerated_src.prefix} autogenerated", check=True, cwd=self.base_path)
call("diff -u -r ../autogenerated ./",
logfile="archive.diff", check=False, cwd=os.path.join(self.base_path, main_src.prefix))
call("diff -u -r --unidirectional-new-file ../autogenerated ./",
logfile="archive.diff.in", check=False, cwd=os.path.join(self.base_path, main_src.prefix))
call("grep -A14 -E '^(diff|Only in)' archive.diff.in",
logfile="archive.diff", check=False, cwd=os.getcwd())
call("rm archive.diff.in", check=False, cwd=os.getcwd())

0 comments on commit 239d8cd

Please sign in to comment.