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:
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user