Replace fake with dry-run (#4050)

This commit is contained in:
Ashish Kumar Sinha
2022-04-14 06:49:57 -07:00
committed by GitHub
parent 8e6b9c8a49
commit 1a504e6e64
2 changed files with 10 additions and 4 deletions
+8 -2
View File
@@ -55,7 +55,12 @@ var (
Usage: "overwrite object(s) on target if it differs from source",
},
cli.BoolFlag{
Name: "fake",
Name: "fake",
Usage: "perform a fake mirror operation",
Hidden: true, // deprecated 2022
},
cli.BoolFlag{
Name: "dry-run",
Usage: "perform a fake mirror operation",
},
cli.BoolFlag{
@@ -870,9 +875,10 @@ func runMirror(ctx context.Context, cancelMirror context.CancelFunc, srcURL, dst
// 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{
isFake: cli.Bool("fake"),
isFake: isFake,
isRemove: isRemove,
isOverwrite: isOverwrite,
isWatch: isWatch,
+2 -2
View File
@@ -1012,7 +1012,7 @@ FLAGS:
--force allow a recursive remove operation
--dangerous allow site-wide removal of objects
--incomplete, -I remove incomplete uploads
--fake perform a fake remove operation
--dry-run perform a fake remove operation
--stdin read object names from STDIN
--older-than value remove objects older than L days, M hours and N minutes
--newer-than value remove objects newer than L days, M hours and N minutes
@@ -1172,7 +1172,7 @@ USAGE:
FLAGS:
--overwrite overwrite object(s) on target if it differs from source
--fake perform a fake mirror operation
--dry-run perform a fake mirror operation
--watch, -w watch and synchronize changes
--remove remove extraneous object(s) on target
--region value specify region when creating new bucket(s) on target (default: "us-east-1")