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

added helper function to get modification time from git #409

Merged
merged 7 commits into from
Mar 18, 2021
Merged

Conversation

JensTimmerman
Copy link
Member

fixes #265

@zeuswpi-bot
Copy link

Check out the preview on https://409.pr.zeus.gent/

@JensTimmerman
Copy link
Member Author

JensTimmerman commented Oct 12, 2020

fbc76e8 shows:
Screenshot 2020-10-12 at 23 48 53

@JensTimmerman
Copy link
Member Author

804c0b1 shows
Screenshot 2020-10-13 at 00 06 04

@JensTimmerman
Copy link
Member Author

as mentioned in #96

fetching the modification date of a single file is antithetical to the way git works
since git does not track per-file history. Fetching the date of a single
file is a Slow Operation because it requires scanning global history
looking for a commit in which the desired file was changed.

@mcbloch mcbloch self-requested a review March 18, 2021 00:46
@mcbloch mcbloch merged commit a3e0a5d into master Mar 18, 2021
@mcbloch mcbloch deleted the gitmetadata branch March 18, 2021 00:47
@werthen
Copy link
Member

werthen commented Mar 18, 2021

@mcbloch There's still an issue with this fix. A lot of posts now show an incorrect writing date, such as the following:

Screenshot_20210318084428.png

Screenshot_20210318084435.png

I think this should be reverted and reopened.

@JensTimmerman
Copy link
Member Author

JensTimmerman commented Mar 18, 2021

I think just removing the “created at” part of the pr I made was not a good idea.
It might fix the merge issue but won’t show the correct created date.

I can look into this later when I have some time.

Is there a documented way to add test to this repo? So a test can pick up a regression like this?

@werthen
Copy link
Member

werthen commented Mar 18, 2021

No custom tests yet, but should be easy enough to add using nanoc's checks: https://nanoc.ws/doc/testing/

@redfast00
Copy link
Member

@JensTimmerman maybe use the first date the file was created instead of the last time?

@JensTimmerman
Copy link
Member Author

JensTimmerman commented Mar 20, 2021

@redfast00 can this be discussed in #265 ? I have asked a few questions on how you want to see edge cases handled in that issue

I believe the time the blog was merged makes more sense than the time a file with that name was created? since that is the original question in that issue

@redfast00 redfast00 deleted the gitmetadata branch September 8, 2021 18:29
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.

Blog post publication date
5 participants