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:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user