From 467b1c39d782a3f2d0b31d73033a0af952896295 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sun, 2 Feb 2020 18:43:33 +0300 Subject: [PATCH] Fix(set-commit-date.py): Skip symlinks An earlier symlink to a file should not override the later file. --- set-commit-date.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/set-commit-date.py b/set-commit-date.py index 74972e4..c0aaa8c 100755 --- a/set-commit-date.py +++ b/set-commit-date.py @@ -66,7 +66,7 @@ for line in git_log.stdout: deleted_files.add(filename) if filename not in deleted_files and filename not in changed_files: changed_files.add(filename) - if os.path.exists(filename): + if os.path.exists(filename) and not os.path.islink(filename): os.utime(filename, (time, time)) else: raise ValueError("stage: %d, line: %s" % (stage, line)) -- 2.39.5