Add file exclusion support (sgard exclude/include).

Paths added to the manifest's exclude list are skipped during Add,
MirrorUp, and MirrorDown directory walks. Excluding a directory
excludes everything under it. Already-tracked entries matching a
new exclusion are removed from the manifest.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-27 00:25:42 -07:00
parent b9b9082008
commit de5759ac77
14 changed files with 568 additions and 8 deletions

View File

@@ -18,6 +18,7 @@ func ManifestToProto(m *manifest.Manifest) *sgardpb.Manifest {
Updated: timestamppb.New(m.Updated),
Message: m.Message,
Files: files,
Exclude: m.Exclude,
}
if m.Encryption != nil {
pb.Encryption = EncryptionToProto(m.Encryption)
@@ -38,6 +39,7 @@ func ProtoToManifest(p *sgardpb.Manifest) *manifest.Manifest {
Updated: p.GetUpdated().AsTime(),
Message: p.GetMessage(),
Files: files,
Exclude: p.GetExclude(),
}
if p.GetEncryption() != nil {
m.Encryption = ProtoToEncryption(p.GetEncryption())