Draft: NO-merge snapshot: Add the snapshot filter
Not all files are needed when taking a snapshot. For example, .lock files in refs/heads are unnecessary because the transaction manager handles concurrency and conflict checks. As a result, we need a filter to specify which files should be included in the snapshot and which should not.
This commit introduces such a filter. The filter builds an internal index based on matching patterns, which determine what to include or exclude. When a snapshot is taken, the repository directory is filtered accordingly.