From 799ded568dc7a40547e417be460de37b985ab11a Mon Sep 17 00:00:00 2001 From: Anis Eleuch Date: Sat, 13 Jan 2024 00:44:48 -0800 Subject: [PATCH] mirror: --preserve should not activate --overwrite (#4821) Users would expect the mirror will not override anything unless --overwrite flag is specified. However, currently --preserve will activate --overwrite, which is not needed. This commit will fix this behavior. --- cmd/mirror-main.go | 1 - 1 file changed, 1 deletion(-) diff --git a/cmd/mirror-main.go b/cmd/mirror-main.go index 382a9b6e..7cfaeeb9 100644 --- a/cmd/mirror-main.go +++ b/cmd/mirror-main.go @@ -943,7 +943,6 @@ func runMirror(ctx context.Context, srcURL, dstURL string, cli *cli.Context, enc // preserve is also expected to be overwritten if necessary isMetadata := cli.Bool("a") || isWatch || len(userMetadata) > 0 - isOverwrite = isOverwrite || isMetadata isFake := cli.Bool("fake") || cli.Bool("dry-run") mopts := mirrorOptions{