actions / actions/checkout

Restore files' original last modified time?

Open
#968 2 comments 16 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
8.9k
Forks
2.8k
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the actions/checkout implementation and its workflow configuration options, using the reported git ls-files command as the behavioral reference. Done means a configurable origin-mtime option restores tracked files' original modification times after checkout, with the behavior documented and verified across the supported checkout workflow.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, github-actions, typescript
Domain
ci-cd, devops
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.