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.
This commit is contained in:
Anis Eleuch
2024-01-13 00:44:48 -08:00
committed by GitHub
parent 2552dbf55e
commit 799ded568d
-1
View File
@@ -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{