Skip to content

Commit 68e5615

Browse files
committed
chore(module): drop v1 legacy and revert to unversioned module path
1 parent 11fffc1 commit 68e5615

18 files changed

Lines changed: 27 additions & 89 deletions

README.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@ AI-powered Git commit message generator. It reads your staged diff, asks an
44
LLM through any OpenAI-compatible API, and prints clean commit message
55
suggestions — one per line, ready to pipe into lazygit, fzf, or any TUI menu.
66

7-
> [!IMPORTANT]
8-
> **v2 is a full rewrite and a breaking change.** The v1 configuration format
9-
> and providers (opencode, Claude Code CLI, Copilot, Gemini) are gone. v2
10-
> talks to exactly one backend family: any endpoint speaking the OpenAI
11-
> chat-completions protocol. Run `lazycommit config set` to start fresh.
12-
137
## Features
148

159
- Suggests a configurable number of commit messages from `git diff --cached`
@@ -22,7 +16,7 @@ suggestions — one per line, ready to pipe into lazygit, fzf, or any TUI menu.
2216
## Installation
2317

2418
```bash
25-
go install github.com/m7medvision/lazycommit/v2@latest
19+
go install github.com/m7medvision/lazycommit@latest
2620
```
2721

2822
Or build from source:
@@ -177,7 +171,6 @@ Variant that lets you edit the message before committing:
177171
- `No staged changes to commit.` — run `git add` first.
178172
- `has no model configured` — run `lazycommit config set`.
179173
- `environment variable X is not set` — your config references `$X`; export it or store the key directly.
180-
- Found v1 config note — v2 uses a new format; run `lazycommit config set` once and delete the old `~/.config/.lazycommit.yaml`.
181174

182175
## License
183176

cmd/commit.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ func newCommitCmd(deps Deps) *cobra.Command {
1111
Args: cobra.NoArgs,
1212
RunE: func(cmd *cobra.Command, _ []string) error {
1313
cmd.SilenceUsage = true
14-
printV1Hint(cmd, deps)
1514

1615
uc, err := deps.NewCommitUC()
1716
if err != nil {

cmd/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88

99
"github.com/spf13/cobra"
1010

11-
"github.com/m7medvision/lazycommit/v2/internal/config"
11+
"github.com/m7medvision/lazycommit/internal/config"
1212
)
1313

1414
func newConfigCmd(deps Deps) *cobra.Command {

cmd/pr.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ func newPRCmd(deps Deps) *cobra.Command {
1111
Args: cobra.ExactArgs(1),
1212
RunE: func(cmd *cobra.Command, args []string) error {
1313
cmd.SilenceUsage = true
14-
printV1Hint(cmd, deps)
1514

1615
uc, err := deps.NewPRUC()
1716
if err != nil {

cmd/root.go

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ package cmd
55
import (
66
"github.com/spf13/cobra"
77

8-
"github.com/m7medvision/lazycommit/v2/internal/app"
9-
"github.com/m7medvision/lazycommit/v2/internal/config"
8+
"github.com/m7medvision/lazycommit/internal/app"
9+
"github.com/m7medvision/lazycommit/internal/config"
1010
)
1111

1212
// Deps is everything the commands need, wired by the composition root. Use
@@ -18,9 +18,6 @@ type Deps struct {
1818
ConfigRepo *config.Repository
1919
BackendNames []string
2020
Version string
21-
// V1Hint is a warning about leftover v1 configuration, printed to
22-
// stderr before generation commands; empty when not applicable.
23-
V1Hint string
2421
}
2522

2623
func NewRoot(deps Deps) *cobra.Command {
@@ -33,9 +30,3 @@ func NewRoot(deps Deps) *cobra.Command {
3330
root.AddCommand(newCommitCmd(deps), newPRCmd(deps), newConfigCmd(deps))
3431
return root
3532
}
36-
37-
func printV1Hint(cmd *cobra.Command, deps Deps) {
38-
if deps.V1Hint != "" {
39-
cmd.PrintErrln(deps.V1Hint)
40-
}
41-
}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/m7medvision/lazycommit/v2
1+
module github.com/m7medvision/lazycommit
22

33
go 1.25
44

internal/app/ports.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ package app
66
import (
77
"context"
88

9-
"github.com/m7medvision/lazycommit/v2/internal/domain"
9+
"github.com/m7medvision/lazycommit/internal/domain"
1010
)
1111

1212
// Generator produces raw LLM output for a prompt. The commit/PR distinction

internal/app/suggest.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"errors"
66
"fmt"
77

8-
"github.com/m7medvision/lazycommit/v2/internal/domain"
8+
"github.com/m7medvision/lazycommit/internal/domain"
99
)
1010

1111
// SuggestionsResult carries generated suggestions, or NoChanges when the

internal/app/suggest_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"strings"
77
"testing"
88

9-
"github.com/m7medvision/lazycommit/v2/internal/domain"
9+
"github.com/m7medvision/lazycommit/internal/domain"
1010
)
1111

1212
type fakeDiffSource struct {

internal/config/config.go

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import (
1212

1313
"gopkg.in/yaml.v3"
1414

15-
"github.com/m7medvision/lazycommit/v2/internal/app"
16-
"github.com/m7medvision/lazycommit/v2/internal/domain"
15+
"github.com/m7medvision/lazycommit/internal/app"
16+
"github.com/m7medvision/lazycommit/internal/domain"
1717
)
1818

1919
const (
@@ -208,25 +208,6 @@ func (r *Repository) PromptSettings() (app.PromptSettings, error) {
208208
}, nil
209209
}
210210

211-
// V1ConfigPath returns the path of a leftover v1 configuration file so the
212-
// CLI can hint that v2 uses a new format, or "" when none exists.
213-
func (r *Repository) V1ConfigPath() string {
214-
base := filepath.Dir(r.globalDir)
215-
for _, name := range []string{".lazycommit.yaml", ".lazycommit.prompts.yaml"} {
216-
p := filepath.Join(base, name)
217-
if _, err := os.Stat(p); err == nil {
218-
return p
219-
}
220-
}
221-
return ""
222-
}
223-
224-
// HasBackendsFile reports whether a v2 backend configuration was saved.
225-
func (r *Repository) HasBackendsFile() bool {
226-
_, err := os.Stat(filepath.Join(r.globalDir, backendsFile))
227-
return err == nil
228-
}
229-
230211
func (r *Repository) expandSecret(value string) (string, error) {
231212
if !strings.HasPrefix(value, "$") {
232213
return value, nil

0 commit comments

Comments
 (0)