patching: fix datetimes in generated patches
This commit is contained in:
parent
8cb17e350b
commit
a15e90542d
1 changed files with 3 additions and 3 deletions
|
@ -173,7 +173,8 @@ def make_patches(
|
|||
with open(toml_path, "w") as file:
|
||||
file.writelines(toml_after)
|
||||
|
||||
diff1 = make_diff_from_lines(diff_path, toml_before, mtime_before, toml_after, mtime_before)
|
||||
mtime_after1 = file_mtime_in_iso_format(toml_path)
|
||||
diff1 = make_diff_from_lines(diff_path, toml_before, mtime_before, toml_after, mtime_after1)
|
||||
else:
|
||||
toml_after = toml_before
|
||||
|
||||
|
@ -182,11 +183,10 @@ def make_patches(
|
|||
editor = detect_editor()
|
||||
subprocess.check_call([editor, toml_path])
|
||||
|
||||
mtime_after2 = file_mtime_in_iso_format(toml_path)
|
||||
|
||||
with open(toml_path) as file:
|
||||
toml_after2 = file.readlines()
|
||||
|
||||
mtime_after2 = file_mtime_in_iso_format(toml_path)
|
||||
diff2 = make_diff_from_lines(diff_path, toml_after, mtime_before, toml_after2, mtime_after2)
|
||||
|
||||
return diff1, diff2
|
||||
|
|
Loading…
Reference in a new issue