Loading hooks/copyright.py +3 −3 Original line number Diff line number Diff line Loading @@ -57,8 +57,6 @@ def get_file_years(paths: list[Path], ignored_commits: set[str]) -> dict[Path, i """ Return a mapping of paths to the year they where last changed (if they are tracked) """ output = dict[Path, int]() cmd = [ 'git', 'log', '--topo-order', '--format=format:%ad %H', '--date=format:%Y', Loading @@ -68,7 +66,9 @@ def get_file_years(paths: list[Path], ignored_commits: set[str]) -> dict[Path, i proc = run(cmd, stdout=PIPE, check=True) if not proc.stdout: return output return {} output = dict[Path, int]() for result in proc.stdout.split(b'\0\0'): commits, files = result.splitlines() Loading Loading
hooks/copyright.py +3 −3 Original line number Diff line number Diff line Loading @@ -57,8 +57,6 @@ def get_file_years(paths: list[Path], ignored_commits: set[str]) -> dict[Path, i """ Return a mapping of paths to the year they where last changed (if they are tracked) """ output = dict[Path, int]() cmd = [ 'git', 'log', '--topo-order', '--format=format:%ad %H', '--date=format:%Y', Loading @@ -68,7 +66,9 @@ def get_file_years(paths: list[Path], ignored_commits: set[str]) -> dict[Path, i proc = run(cmd, stdout=PIPE, check=True) if not proc.stdout: return output return {} output = dict[Path, int]() for result in proc.stdout.split(b'\0\0'): commits, files = result.splitlines() Loading