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

fallback to git last modified upon empty git created date #667

Merged
merged 1 commit into from
Sep 27, 2024

Conversation

weakish
Copy link
Contributor

@weakish weakish commented Sep 27, 2024

Description

getGitDate("created", ...) uses git log --diff-filter=A
which returns nothing for files where the latest commit had a merge conflict.
Previously lume would use filesystem last modified date as a fallback.
This commit introduces a change to fall back to git modified first when using special value git created and getGitDate("created", ...) returns nothing.
I think git modified is more reliable than file system creation time under most CI environments.

Related Issues

Check List

  • Have you read the
    CODE OF CONDUCT
  • Have you read the document
    CONTRIBUTING
    • One pull request per feature. If you want to do more than one thing,
      send multiple pull request.
    • Write tests. (This is for an uncommon corner case so I skipped tests for now.)
    • Run deno fmt to fix the code format before commit.
    • Document any change in the CHANGELOG.md.

@oscarotero oscarotero merged commit 2d75fa2 into lumeland:main Sep 27, 2024
3 checks passed
@oscarotero
Copy link
Member

It looks good to me. Thanks!

@weakish weakish deleted the git-created-date branch September 27, 2024 09:27
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

Successfully merging this pull request may close these issues.

2 participants