mirror of
https://github.com/restic/restic.git
synced 2025-10-27 12:18:35 +00:00
Add and use MasterIndex
This commit is contained in:
@@ -73,12 +73,14 @@ func printTrees(repo *repository.Repository, wr io.Writer) error {
|
||||
|
||||
trees := []backend.ID{}
|
||||
|
||||
for blob := range repo.Index().Each(done) {
|
||||
if blob.Type != pack.Tree {
|
||||
continue
|
||||
}
|
||||
for _, idx := range repo.Index().All() {
|
||||
for blob := range idx.Each(nil) {
|
||||
if blob.Type != pack.Tree {
|
||||
continue
|
||||
}
|
||||
|
||||
trees = append(trees, blob.ID)
|
||||
trees = append(trees, blob.ID)
|
||||
}
|
||||
}
|
||||
|
||||
for _, id := range trees {
|
||||
|
||||
@@ -49,8 +49,10 @@ func (cmd CmdList) Execute(args []string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
for blob := range repo.Index().Each(nil) {
|
||||
cmd.global.Printf("%s\n", blob.ID)
|
||||
for _, idx := range repo.Index().All() {
|
||||
for blob := range idx.Each(nil) {
|
||||
cmd.global.Printf("%s\n", blob.ID)
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user