Skip to content

Track moved files #17

Merged
ainame merged 2 commits intomainfrom
list-order
Sep 11, 2025
Merged

Track moved files #17
ainame merged 2 commits intomainfrom
list-order

Conversation

@ainame
Copy link
Owner

@ainame ainame commented Sep 11, 2025

Previously, Post.publishedAt wasn't preserved when a file under contents/ is moved/renamed.
This is due to --follow option was missing in GitLogReader. Now it's added and will track those changes.

Additionally I fixed tuzuru list's order (it should have sorted by published at)

Copilot AI review requested due to automatic review settings September 11, 2025 01:39
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds file tracking support to preserve publishedAt metadata when files are moved or renamed under the contents/ directory. Previously, the Git log reader wasn't following file history, causing metadata to be lost during file operations.

  • Adds --follow flag to Git log commands to track file renames and moves
  • Sorts posts by publication date in descending order in the list command

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
Sources/TuzuruLib/SourceLoader/GitLogReader.swift Adds --follow flag to Git log command for tracking moved/renamed files
Sources/Command/ListCommand.swift Sorts posts by publication date in descending order for better display

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@ainame ainame merged commit 987c2b9 into main Sep 11, 2025
1 check passed
@ainame ainame deleted the list-order branch September 11, 2025 01:41
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