Skip to content

Commit

Permalink
Rename to --digest-changes-only
Browse files Browse the repository at this point in the history
  • Loading branch information
emcfarlane committed Dec 31, 2024
1 parent bea51d0 commit dc1ce0d
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 29 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## [Unreleased]

- Fix `buf plugin push --label` to allow pushing a plugin with a label.
- Add `--only-changes` flag to `buf registry {module,plugin} commit list` to filter
- Add `--digest-changes-only` flag to `buf registry {module,plugin} commit list` to filter
out commits that have no digest changes.

## [v1.48.0] - 2024-12-19
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ import (
)

const (
pageSizeFlagName = "page-size"
pageTokenFlagName = "page-token"
reverseFlagName = "reverse"
formatFlagName = "format"
onlyChangesFlagName = "only-changes"
pageSizeFlagName = "page-size"
pageTokenFlagName = "page-token"
reverseFlagName = "reverse"
formatFlagName = "format"
digestChangesOnlyFlagName = "digest-changes-only"

defaultPageSize = 10
)
Expand Down Expand Up @@ -68,11 +68,11 @@ If no reference is specified, it lists all commits in this module.
}

type flags struct {
Format string
PageSize uint32
PageToken string
Reverse bool
OnlyChanges bool
Format string
PageSize uint32
PageToken string
Reverse bool
DigestChangesOnly bool
}

func newFlags() *flags {
Expand Down Expand Up @@ -102,10 +102,10 @@ func (f *flags) Bind(flagSet *pflag.FlagSet) {
fmt.Sprintf(`The output format to use. Must be one of %s`, bufprint.AllFormatsString),
)
flagSet.BoolVar(
&f.OnlyChanges,
onlyChangesFlagName,
&f.DigestChangesOnly,
digestChangesOnlyFlagName,
false,
`Only commits with changed digests. By default, all commits are listed`,
`Only commits that have changed digests. By default, all commits are listed`,
)
}

Expand Down Expand Up @@ -238,7 +238,7 @@ func run(
},
},
Order: labelHistoryOrder,
OnlyCommitsWithChangedDigests: flags.OnlyChanges,
OnlyCommitsWithChangedDigests: flags.DigestChangesOnly,
},
),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ import (
)

const (
pageSizeFlagName = "page-size"
pageTokenFlagName = "page-token"
reverseFlagName = "reverse"
formatFlagName = "format"
onlyChangesFlagName = "only-changes"
pageSizeFlagName = "page-size"
pageTokenFlagName = "page-token"
reverseFlagName = "reverse"
formatFlagName = "format"
digestChangesOnlyFlagName = "digest-changes-only"

defaultPageSize = 10
)
Expand Down Expand Up @@ -68,11 +68,11 @@ If no reference is specified, it lists all commits in this plugin.
}

type flags struct {
Format string
PageSize uint32
PageToken string
Reverse bool
OnlyChanges bool
Format string
PageSize uint32
PageToken string
Reverse bool
DigestChangesOnly bool
}

func newFlags() *flags {
Expand Down Expand Up @@ -105,10 +105,10 @@ func (f *flags) Bind(flagSet *pflag.FlagSet) {
fmt.Sprintf(`The output format to use. Must be one of %s`, bufprint.AllFormatsString),
)
flagSet.BoolVar(
&f.OnlyChanges,
onlyChangesFlagName,
&f.DigestChangesOnly,
digestChangesOnlyFlagName,
false,
`Only commits with changed digests. By default, all commits are listed`,
`Only commits that have changed digests. By default, all commits are listed`,
)
}

Expand Down Expand Up @@ -242,7 +242,7 @@ func run(
},
},
Order: labelHistoryOrder,
OnlyCommitsWithChangedDigests: flags.OnlyChanges,
OnlyCommitsWithChangedDigests: flags.DigestChangesOnly,
},
),
)
Expand Down

0 comments on commit dc1ce0d

Please sign in to comment.