Skip to content

Commit f3fbbd5

Browse files
committed
Add snapshots flag to log command
1 parent 49f93c0 commit f3fbbd5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

cmd/log.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import (
2424
)
2525

2626
var oneline bool
27+
var snapshots bool
2728

2829
// logCmd represents the log command
2930
var logCmd = &cobra.Command{
@@ -37,7 +38,10 @@ var logCmd = &cobra.Command{
3738
er(err)
3839
}
3940

40-
list, err := repo.ListCommits("")
41+
options := []s3git.ListCommitOptions{}
42+
options = append(options, s3git.ListCommitOptionSetOnlySnapshots(true))
43+
44+
list, err := repo.ListCommits("", options...)
4145
if err != nil {
4246
er(err)
4347
}
@@ -70,4 +74,5 @@ func init() {
7074

7175
// Add local message flags
7276
logCmd.Flags().BoolVarP(&oneline, "pretty", "p", false, "Pretty format")
77+
logCmd.Flags().BoolVar(&snapshots, "snapshots", false, "Just show snapshot commits")
7378
}

0 commit comments

Comments
 (0)