Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore files' original last modified time? #968

Open
lulu010722 opened this issue Oct 17, 2022 · 1 comment
Open

Restore files' original last modified time? #968

lulu010722 opened this issue Oct 17, 2022 · 1 comment

Comments

@lulu010722
Copy link

Every time someone clones other's repo, the last modified time of each file and directory is overwritten with the time of clone.
However, in some cases, we need to know the original time infomation, such as in a blog static site.

There are ways to fix this.
For example, run git ls-files -z | while read -d '' path; do touch -d $(git log -1 --format="@%ct" "$path") "$path"; done in the workflow file.
But, can you integrate this feature inside actions/checkout and provide a config option like "origin-mtime"?

@yu-iskw
Copy link

yu-iskw commented Feb 10, 2025

+1

We can also utilize a community-based Action as https://github.com/marketplace/actions/git-restore-mtime . However, it would be great for the checkout Action officially supports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants