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:
Alexander Neumann
2015-07-22 22:33:23 +02:00
parent ec3893e655
commit cc34401152
4 changed files with 9 additions and 5 deletions

View File

@@ -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{}