From 3e43f8e76fc3c1092ef672dae1b09391f758d508 Mon Sep 17 00:00:00 2001 From: Robert Schindler Date: Tue, 19 Oct 2021 17:56:35 +0200 Subject: [PATCH] Migrate: pick latest instead of oldest snapshot with --latest-only (#1420) Fix #1414 --- cli/command_snapshot_migrate.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/command_snapshot_migrate.go b/cli/command_snapshot_migrate.go index 01d1dcb6c..a872d2fba 100644 --- a/cli/command_snapshot_migrate.go +++ b/cli/command_snapshot_migrate.go @@ -291,7 +291,7 @@ func (c *commandSnapshotMigrate) migrateSingleSourceSnapshot(ctx context.Context func (c *commandSnapshotMigrate) filterSnapshotsToMigrate(s []*snapshot.Manifest) []*snapshot.Manifest { if c.migrateLatestOnly && len(s) > 0 { - s = s[0:1] + s = s[len(s)-1:] } return s