Skip to content

Improved ignore pattern handling and flatten command for nested history#166

Merged
ptrpfn merged 10 commits intoascmitc:masterfrom
pomfort:asc-mhl-1-2
Jul 4, 2025
Merged

Improved ignore pattern handling and flatten command for nested history#166
ptrpfn merged 10 commits intoascmitc:masterfrom
pomfort:asc-mhl-1-2

Conversation

@pfn-asm
Copy link
Collaborator

@pfn-asm pfn-asm commented Jul 4, 2025

  • Apply the ignore patterns relative to the (nested) history they are in and not relative to the root history.
    • example: a pattern of /test.txt inside a nested history only applies to the one file at exactly this path inside the nested history, not a file test.txt inside the root history
  • Transform an ignore patterns provided in a root history to be relative to the nested history where it applies.
    • example: an ignore pattern /A/AA/test.txt passed to the create command that applies to a file in a nested history (starting at /A/AA) is now stored as /test.txt only in that nested history.
  • Further improve the ignore patterns handling to match the specification (handling of * wildcard, relative and absolute patterns, and handling of folders) and add many new tests.
  • extend the flatten command to work with nested histories and the flattened manifest is not placed in a temporary folder anymore.
  • Also Improve performance of the create command by removing unnecessary relative path resolution (relevant for histories > 1000 files)

pfn-djf and others added 10 commits May 14, 2025 09:58
There is no need to collect the relative paths again as the not_found_paths already contains all those paths
The flatten command only flattened the root history, but not child histories. Including the hashes from the child histories was missing in the implementation and is added with this pull request.
# Conflicts:
#	ascmhl/generator.py
so that we as well can ignore a completely missing sub history
Copy link
Collaborator

@ptrpfn ptrpfn left a comment

Choose a reason for hiding this comment

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

Went through the changes including new tests together with @pfn-asm in a review session – all looks good. Also closed other PRs in this session that are covered in this pull request.

@ptrpfn ptrpfn merged commit 0fb61f1 into ascmitc:master Jul 4, 2025
6 checks passed
@ptrpfn ptrpfn deleted the asc-mhl-1-2 branch July 4, 2025 09:49
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.

3 participants