(ctx context.Context, rep repo.RepositoryWriter, m *snapshot.Manifest)
| 71 | } |
| 72 | |
| 73 | func (c *commandSnapshotPin) pinSnapshot(ctx context.Context, rep repo.RepositoryWriter, m *snapshot.Manifest) error { |
| 74 | if !m.UpdatePins(c.addPins, c.removePins) { |
| 75 | log(ctx).Infof("No change for snapshot at %v of %v", formatTimestamp(m.StartTime.ToTime()), m.Source) |
| 76 | |
| 77 | return nil |
| 78 | } |
| 79 | |
| 80 | log(ctx).Infof("Updating snapshot at %v of %v", formatTimestamp(m.StartTime.ToTime()), m.Source) |
| 81 | |
| 82 | return errors.Wrap(snapshot.UpdateSnapshot(ctx, rep, m), "error updating snapshot") |
| 83 | } |
no test coverage detected