Skip to content

Comments

Import/export bug fixes#5780

Merged
WithoutPants merged 2 commits intostashapp:developfrom
WithoutPants:issues/5775
Apr 1, 2025
Merged

Import/export bug fixes#5780
WithoutPants merged 2 commits intostashapp:developfrom
WithoutPants:issues/5775

Conversation

@WithoutPants
Copy link
Collaborator

Fixes some issues while investigating #5775

  • includes parent tags in export if including depedencies
    I had an issue where the import would fail because the parent tags weren't included in the export.

  • add short hash of basename as suffix when sanitising basenames
    I had an issue where two tags with names parent and #parent would end up with the same filename.

@WithoutPants WithoutPants added the bug Something isn't working label Mar 28, 2025
@WithoutPants WithoutPants added this to the Version 0.29.0 milestone Mar 28, 2025
@WithoutPants WithoutPants requested a review from Copilot March 28, 2025 05:56
Copy link

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 fixes issues with importing/exporting tags by ensuring parent tags are included in the export and making exported basenames unique by appending a short hash. Key changes include:

  • Introducing a recursive function to collect dependent (parent) tag IDs.
  • Updating basename sanitization to include a short hash suffix for uniqueness.
  • Adjusting export progress tracking to account for newly added tags.

Reviewed Changes

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

File Description
pkg/tag/export.go Adds a recursive function (GetDependentTagIDs) to include parent tags as dependencies in exports.
pkg/fsutil/file_test.go Updates tests to expect the new hash suffix in sanitised basenames.
pkg/fsutil/file.go Modifies SanitiseBasename to append a short hash to the cleaned basename for uniqueness.
internal/manager/task_export.go Adjusts tag export progress tracking and includes dependency tags during export processing.

@WithoutPants WithoutPants merged commit 1d3bc40 into stashapp:develop Apr 1, 2025
2 checks passed
XGFan pushed a commit to XGFan/stash that referenced this pull request Oct 22, 2025
* Include parent tags in export if including dependencies
* Handle uniqueness when sanitising filenames
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant