Closed ghnp5 closed 6 months ago
No idea, but settings like sparse-checkout
and all the git fetch
dance might trick git-restore-mtime
, specially git fetch --depth=1
, as IIRC it might make only the last commit to be available to git-restore-mtime
, so from its point of view it's possible that it thinks all files were created in that last (and only) commit.
Care to post the execution log from --verbose
? Also, is this a public repository? Care to share the URL (or a public mirror) so I can test it too? If not, what does git whatchanged --pretty=%at
says, both with and without the custom fetches?
Thank you for your reply.
Thanks! What you said resolved my problem, actually.
All I had to do is add --unshallow
to the git fetch
command before calling git-restore-mtime
:
git fetch --unshallow --prune --no-recurse-submodules origin +refs/heads/*:refs/remotes/origin/* +refs/tags/*:refs/tags/*
chmod +x $GITHUB_ACTION_PATH/git-restore-mtime
$GITHUB_ACTION_PATH/git-restore-mtime -v
Appreciated!!
Thanks for the tool, and congratulations in getting it added to the distro repositories 💪🏻👍🏻 Have a great day.
Hi,
I'm running this:
And then another step where I do:
(I tried with and without the
git fetch
command in the second block above)The problem is that
git-restore-mtime
basically just puts the timestamp of the last commit on that repository, regardless of the file.Any ideas what I'm doing wrong? :)
Thank you very much!