Skip to content

Restore files' original last modified time? #968

Open
@lulu010722

Description

@lulu010722

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"?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions