forked from gopasspw/gopass
-
Notifications
You must be signed in to change notification settings - Fork 0
/
git.go
50 lines (39 loc) · 937 Bytes
/
git.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package mock
import (
"context"
"github.com/blang/semver"
)
// Git is a no-op git backend
type Git struct{}
// New creates a new Git object
func New() *Git {
return &Git{}
}
// Add does nothing
func (g *Git) Add(ctx context.Context, args ...string) error {
return nil
}
// Commit does nothing
func (g *Git) Commit(ctx context.Context, msg string) error {
return nil
}
// Push does nothing
func (g *Git) Push(ctx context.Context, origin, branch string) error {
return nil
}
// Cmd does nothing
func (g *Git) Cmd(ctx context.Context, name string, args ...string) error {
return nil
}
// Init does nothing
func (g *Git) Init(context.Context, string, string, string) error {
return nil
}
// InitConfig does nothing
func (g *Git) InitConfig(context.Context, string, string, string) error {
return nil
}
// Version returns an empty version
func (g *Git) Version(context.Context) semver.Version {
return semver.Version{}
}