mirror of
https://github.com/restic/restic.git
synced 2025-08-23 19:17:36 +00:00
Record exclude patterns in snapshot
This adds the exclude patterns used to create a backup in the snapshot, so we can later compute statistics (like git does) on the data structure, e.g. added/removed files etc. For that, we need the exclude pattern.
This commit is contained in:
@@ -36,6 +36,7 @@ type Archiver struct {
|
||||
|
||||
Error func(dir string, fi os.FileInfo, err error) error
|
||||
SelectFilter pipe.SelectFunc
|
||||
Excludes []string
|
||||
}
|
||||
|
||||
// NewArchiver returns a new archiver.
|
||||
@@ -549,6 +550,7 @@ func (arch *Archiver) Snapshot(p *Progress, paths []string, parentID backend.ID)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
sn.Excludes = arch.Excludes
|
||||
|
||||
jobs := archivePipe{}
|
||||
|
||||
|
Reference in New Issue
Block a user