Skip to content

Commit e5c0d84

Browse files
committed
Add $GITSYNC_VERBOSE to set verbosity via env
1 parent 1cab59e commit e5c0d84

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ OPTIONS
361361
The username to use for git authentication (see --password-file or
362362
--password).
363363
364-
-v, --verbose <int>
364+
-v, --verbose <int>, $GITSYNC_VERBOSE
365365
Set the log verbosity level. Logs at this level and lower will be
366366
printed. Logs follow these guidelines:
367367

main.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,8 @@ func main() {
342342
flHelp := pflag.BoolP("help", "h", false, "print help text and exit")
343343
flManual := pflag.Bool("man", false, "print the full manual and exit")
344344

345-
flVerbose := pflag.IntP("verbose", "v", 0,
345+
flVerbose := pflag.IntP("verbose", "v",
346+
envInt(0, "GITSYNC_VERBOSE"),
346347
"logs at this V level and lower will be printed")
347348

348349
flRepo := pflag.String("repo",
@@ -2506,7 +2507,7 @@ OPTIONS
25062507
The username to use for git authentication (see --password-file or
25072508
--password).
25082509
2509-
-v, --verbose <int>
2510+
-v, --verbose <int>, $GITSYNC_VERBOSE
25102511
Set the log verbosity level. Logs at this level and lower will be
25112512
printed. Logs follow these guidelines:
25122513

0 commit comments

Comments
 (0)