MestreLion/git-tools

git-restore-mtime : Restore timestamp from remote repository.

Closed this issue · 1 comments

The current git-restore-mtime does not work if you have only cloned the remote repository to a limited depth: as in git clone --depth 1 https://github.com/sanskrit-coders/stardict-sanskrit.git. It would be super if timestamp could be restored from the remote (say github) repository.

By definition, using --depth 1 prevents git-restore-mtime from working, as it depends on the full history to get the last commit date of files.

About remote repository update, I'm not sure how a remote could change the modification time of your local files, and I believe this is impossible. Maybe if github, as a provider, used git-restore-mtimeon its local files when the user selected ZIP Download (which is basically the same as git clone --depth 1). But that needs a request to Github itself, not my project.

Feel free to reopen this if you find any alternative solutions or have any ideas on how to achieve that.