Feat/skip archive dive#41
Conversation
|
It also occurs to me that we are starting to accumulate default literals for policy configurations (e.g. I think I will open a follow-up Issue to centralize these policies into a single (These are distinct though from e.g. |
|
Testing locally, I had a zip file ignored in the root level to which With archive dive, I did also get these Mac files: |
7b99dea to
9bc6ec5
Compare
It did not miss the file, but the order was different (it moved the |
|
Great, I think that makes sense. We can follow up on that using the mapper's response merged by path components to keep containers (directories and/or archives) and contents together. |
|
On this:
That behavior is intended, for a couple reasons:
I think fundamentally, archives should be handled differently than a working directory because they more represent fixed artifacts whose contents have already been vetted in some way. So I believe it would not be wise to observe |
That makes perfect sense. It does feel like a design decision worth documenting :) |
|
@egrace479 added rationale to README on hashing all archive contents. Look good to merge? |
New CLI option to skip descent into archive contents and instead only checksum the archive file itself.
Addresses #36
Specifically:
--archive-dive(default, does descend—matches previous behavior before flag addition) and--no-archive-dive(does not descend)get_checksums()andmapper.gather_file_paths(). When the dive flag is false, archive files are returned as regular files by the mapper for simple opaque hashing. When true, previous behavior is preserved. (Note that no accounting for nested archive files is done here—still a concern for Add TAR support and decide how nested archives are dealt with. #34)Mapperwhen flag is falsemain()behavior when flag is falsemain()archive_diveadditiongpt-5.4 was used to implement tests based on my specifications and iterative feedback as well as provide review of implementation.