Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ func init() {
diffCmd.Flags().BoolVar(&check, "check", false, "exit non-zero if whitespace errors are found (equivalent to git diff --check)")

diffCmd.Flags().BoolVar(&ignoreEmpty, "ignore-empty", false, "ignore empty diffs")
diffCmd.Flags().BoolVar(&noColor, "no-color", false, "disable color output")
diffCmd.Flags().BoolVar(&short, "shortstat", false, "show only the number of changed files, insertions, and deletions")
diffCmd.Flags().BoolVar(&nameOnly, "name-only", false, "show only names of changed files")

Expand Down Expand Up @@ -77,6 +76,7 @@ func diffCmdValidArgsFunc(cmd *cobra.Command, args []string, toComplete string)

func diffFunc(cmd *cobra.Command, args []string) error {
verbose := viper.GetBool("verbose")
noColor := viper.GetBool("no-color")
ctx := ctxhelper.WithVerbose(context.Background(), verbose)

repoDirs, err := clt.GetDirs(ctx, ".")
Expand Down
3 changes: 1 addition & 2 deletions cmd/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,13 @@ import (

var (
oneline bool
noColor bool
maxCount int
)

func init() {
RootCmd.AddCommand(logCmd)

logCmd.Flags().BoolVar(&oneline, "oneline", false, "show each commit on a single line")
logCmd.Flags().BoolVar(&noColor, "no-color", false, "disable color output")
logCmd.Flags().BoolVar(&ignoreEmpty, "ignore-empty", false, "ignore empty repositories")
logCmd.Flags().IntVarP(&maxCount, "max-count", "n", 0, "limit the number of commits shown per repo (0 means no limit)")
}
Expand Down Expand Up @@ -77,6 +75,7 @@ func logCmdValidArgsFunc(cmd *cobra.Command, args []string, toComplete string) (

func logFunc(cmd *cobra.Command, args []string) error {
verbose := viper.GetBool("verbose")
noColor := viper.GetBool("no-color")
ctx := ctxhelper.WithVerbose(context.Background(), verbose)

repoDirs, err := clt.GetDirs(ctx, ".")
Expand Down
Loading