MestreLion / git-tools

Assorted git tools, including git-restore-mtime
GNU General Public License v3.0
295 stars 74 forks source link

git-restore-mtime: skip symlinks if the OS does not support updating them #30

Closed floppym closed 6 years ago

floppym commented 7 years ago

If we call os.utime on a symlink, the OS will normally dereference the symlink and update the times on the target.

To avoid this, we pass follow_symlink=False, which only works on a subset of python versions and operating systems. If it is not supported, skip updating the symlink since the result is probably not desirable.

Fixes: #28

floppym commented 6 years ago

Any feedback on this?

MestreLion commented 6 years ago

Thanks! And sorry for taking so long