diff --git a/client/clienter.go b/client/clienter.go index c74041d..fadacb8 100644 --- a/client/clienter.go +++ b/client/clienter.go @@ -24,7 +24,7 @@ type Clienter interface { GetRepos(ctx context.Context, name string) ([]*github.Repository, error) GetTagNames(ctx context.Context, dirs []string) ([]string, error) ListTags(ctx context.Context, repoDirs []string, args ...string) error - LogRepos(ctx context.Context, repoDirs []string, ignoreEmtpy bool, args ...string) error + LogRepos(ctx context.Context, repoDirs []string, ignoreEmpty bool, args ...string) error MergeRepos(ctx context.Context, repoDirs []string, args ...string) error PullRepos(ctx context.Context, repoDirs []string, args ...string) error PushRepos(ctx context.Context, repoDirs []string, args ...string) error diff --git a/client/testclient/client.go b/client/testclient/client.go index 80c0bff..d17753e 100644 --- a/client/testclient/client.go +++ b/client/testclient/client.go @@ -181,7 +181,7 @@ func (c *TestClient) DiffRepos(ctx context.Context, repoDirs []string, cfg *repo return c.Errors["DiffRepos"] } -func (c *TestClient) LogRepos(ctx context.Context, repoDirs []string, ignoreEmtpy bool, args ...string) error { +func (c *TestClient) LogRepos(ctx context.Context, repoDirs []string, ignoreEmpty bool, args ...string) error { c.CommandsCalled = append(c.CommandsCalled, "LogRepos") return c.Errors["LogRepos"] diff --git a/cmd/diff.go b/cmd/diff.go index e8965e9..289d235 100644 --- a/cmd/diff.go +++ b/cmd/diff.go @@ -14,7 +14,7 @@ var ( short bool nameOnly bool staged bool - ignoreEmtpy bool + ignoreEmpty bool ignoreFilePrefix []string matchExtension []string ) @@ -27,7 +27,7 @@ func init() { diffCmd.Flags().BoolVar(&staged, "staged", false, "show staged changes instead of unstaged (equivalent to --cached)") - diffCmd.Flags().BoolVar(&ignoreEmtpy, "ignore-empty", false, "ignore empty diffs") + 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") @@ -97,7 +97,7 @@ func diffFunc(cmd *cobra.Command, args []string) error { } cfg := &repos.DiffConfig{ - IgnoreEmpty: ignoreEmtpy, + IgnoreEmpty: ignoreEmpty, IgnoreFilePrefix: ignoreFilePrefix, MatchExtension: matchExtension, Args: args, diff --git a/cmd/log.go b/cmd/log.go index fe5cd8b..54c876a 100644 --- a/cmd/log.go +++ b/cmd/log.go @@ -21,7 +21,7 @@ func init() { 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(&ignoreEmtpy, "ignore-empty", false, "Ignore empty repositories") + 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)") } @@ -97,7 +97,7 @@ func logFunc(cmd *cobra.Command, args []string) error { args = append(args, "--color") } - err = clt.LogRepos(ctx, repoDirs, ignoreEmtpy, args...) + err = clt.LogRepos(ctx, repoDirs, ignoreEmpty, args...) if err != nil { cmd.SilenceUsage = true return fmt.Errorf("log repos: %w", err) diff --git a/cmd/status.go b/cmd/status.go index bb2a08a..4267ba0 100644 --- a/cmd/status.go +++ b/cmd/status.go @@ -16,7 +16,7 @@ func init() { statusCmd.Flags().BoolVarP(&short, "short", "s", false, "show status in short format") statusCmd.Flags().BoolVarP(&showBranch, "branch", "b", false, "show branch and upstream tracking info") - statusCmd.Flags().BoolVar(&ignoreEmtpy, "ignore-empty", false, "ignore repos with no changes (most useful with --short)") + statusCmd.Flags().BoolVar(&ignoreEmpty, "ignore-empty", false, "ignore repos with no changes (most useful with --short)") } var statusCmd = &cobra.Command{ @@ -45,7 +45,7 @@ func statusFunc(cmd *cobra.Command, args []string) error { args = append(args, "--branch") } - err = clt.StatusRepos(ctx, repoDirs, ignoreEmtpy, args...) + err = clt.StatusRepos(ctx, repoDirs, ignoreEmpty, args...) if err != nil { cmd.SilenceUsage = true return fmt.Errorf("status repos: %w", err)