Skip to content

Commit 3490bba

Browse files
authored
Merge pull request #66 from gomicro/cleanup
fixing typo of ignore empty flag
2 parents 24449ba + 87f7592 commit 3490bba

5 files changed

Lines changed: 9 additions & 9 deletions

File tree

client/clienter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ type Clienter interface {
2424
GetRepos(ctx context.Context, name string) ([]*github.Repository, error)
2525
GetTagNames(ctx context.Context, dirs []string) ([]string, error)
2626
ListTags(ctx context.Context, repoDirs []string, args ...string) error
27-
LogRepos(ctx context.Context, repoDirs []string, ignoreEmtpy bool, args ...string) error
27+
LogRepos(ctx context.Context, repoDirs []string, ignoreEmpty bool, args ...string) error
2828
MergeRepos(ctx context.Context, repoDirs []string, args ...string) error
2929
PullRepos(ctx context.Context, repoDirs []string, args ...string) error
3030
PushRepos(ctx context.Context, repoDirs []string, args ...string) error

client/testclient/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ func (c *TestClient) DiffRepos(ctx context.Context, repoDirs []string, cfg *repo
181181
return c.Errors["DiffRepos"]
182182
}
183183

184-
func (c *TestClient) LogRepos(ctx context.Context, repoDirs []string, ignoreEmtpy bool, args ...string) error {
184+
func (c *TestClient) LogRepos(ctx context.Context, repoDirs []string, ignoreEmpty bool, args ...string) error {
185185
c.CommandsCalled = append(c.CommandsCalled, "LogRepos")
186186

187187
return c.Errors["LogRepos"]

cmd/diff.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ var (
1414
short bool
1515
nameOnly bool
1616
staged bool
17-
ignoreEmtpy bool
17+
ignoreEmpty bool
1818
ignoreFilePrefix []string
1919
matchExtension []string
2020
)
@@ -27,7 +27,7 @@ func init() {
2727

2828
diffCmd.Flags().BoolVar(&staged, "staged", false, "show staged changes instead of unstaged (equivalent to --cached)")
2929

30-
diffCmd.Flags().BoolVar(&ignoreEmtpy, "ignore-empty", false, "ignore empty diffs")
30+
diffCmd.Flags().BoolVar(&ignoreEmpty, "ignore-empty", false, "ignore empty diffs")
3131
diffCmd.Flags().BoolVar(&noColor, "no-color", false, "disable color output")
3232
diffCmd.Flags().BoolVar(&short, "shortstat", false, "show only the number of changed files, insertions, and deletions")
3333
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 {
9797
}
9898

9999
cfg := &repos.DiffConfig{
100-
IgnoreEmpty: ignoreEmtpy,
100+
IgnoreEmpty: ignoreEmpty,
101101
IgnoreFilePrefix: ignoreFilePrefix,
102102
MatchExtension: matchExtension,
103103
Args: args,

cmd/log.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ func init() {
2121

2222
logCmd.Flags().BoolVar(&oneline, "oneline", false, "Show each commit on a single line")
2323
logCmd.Flags().BoolVar(&noColor, "no-color", false, "Disable color output")
24-
logCmd.Flags().BoolVar(&ignoreEmtpy, "ignore-empty", false, "Ignore empty repositories")
24+
logCmd.Flags().BoolVar(&ignoreEmpty, "ignore-empty", false, "Ignore empty repositories")
2525
logCmd.Flags().IntVarP(&maxCount, "max-count", "n", 0, "Limit the number of commits shown per repo (0 means no limit)")
2626
}
2727

@@ -97,7 +97,7 @@ func logFunc(cmd *cobra.Command, args []string) error {
9797
args = append(args, "--color")
9898
}
9999

100-
err = clt.LogRepos(ctx, repoDirs, ignoreEmtpy, args...)
100+
err = clt.LogRepos(ctx, repoDirs, ignoreEmpty, args...)
101101
if err != nil {
102102
cmd.SilenceUsage = true
103103
return fmt.Errorf("log repos: %w", err)

cmd/status.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func init() {
1616

1717
statusCmd.Flags().BoolVarP(&short, "short", "s", false, "show status in short format")
1818
statusCmd.Flags().BoolVarP(&showBranch, "branch", "b", false, "show branch and upstream tracking info")
19-
statusCmd.Flags().BoolVar(&ignoreEmtpy, "ignore-empty", false, "ignore repos with no changes (most useful with --short)")
19+
statusCmd.Flags().BoolVar(&ignoreEmpty, "ignore-empty", false, "ignore repos with no changes (most useful with --short)")
2020
}
2121

2222
var statusCmd = &cobra.Command{
@@ -45,7 +45,7 @@ func statusFunc(cmd *cobra.Command, args []string) error {
4545
args = append(args, "--branch")
4646
}
4747

48-
err = clt.StatusRepos(ctx, repoDirs, ignoreEmtpy, args...)
48+
err = clt.StatusRepos(ctx, repoDirs, ignoreEmpty, args...)
4949
if err != nil {
5050
cmd.SilenceUsage = true
5151
return fmt.Errorf("status repos: %w", err)

0 commit comments

Comments
 (0)