v0.30.0 c899179

PushTreeReader.go RawHistoryFolder

1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package mocks
6
7import (
8	"context"
9
10	"bnema.dev/ermite/internal/domain"
11	"bnema.dev/ermite/internal/ports"
12	mock "github.com/stretchr/testify/mock"
13)
14
15// NewPushTreeReader creates a new instance of PushTreeReader. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
16// The first argument is typically a *testing.T value.
17func NewPushTreeReader(t interface {
18	mock.TestingT
19	Cleanup(func())
20}) *PushTreeReader {
21	if helper, ok := t.(interface{ Helper() }); ok {
22		helper.Helper()
23	}
24
25	mock := &PushTreeReader{}
26	mock.Mock.Test(t)
27
28	t.Cleanup(func() {
29		if helper, ok := t.(interface{ Helper() }); ok {
30			helper.Helper()
31		}
32		mock.AssertExpectations(t)
33	})
34
35	return mock
36}
37
38// PushTreeReader is an autogenerated mock type for the PushTreeReader type
39type PushTreeReader struct {
40	mock.Mock
41}
42
43type PushTreeReader_Expecter struct {
44	mock *mock.Mock
45}
46
47func (_m *PushTreeReader) EXPECT() *PushTreeReader_Expecter {
48	return &PushTreeReader_Expecter{mock: &_m.Mock}
49}
50
51// FirstDifferentEntry provides a mock function for the type PushTreeReader
52func (_mock *PushTreeReader) FirstDifferentEntry(ctx context.Context, repo domain.RepoName, objects ports.PushObjects, old domain.ObjectID, new domain.ObjectID) (string, error) {
53	ret := _mock.Called(ctx, repo, objects, old, new)
54
55	if len(ret) == 0 {
56		panic("no return value specified for FirstDifferentEntry")
57	}
58
59	var r0 string
60	var r1 error
61	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, ports.PushObjects, domain.ObjectID, domain.ObjectID) (string, error)); ok {
62		return returnFunc(ctx, repo, objects, old, new)
63	}
64	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, ports.PushObjects, domain.ObjectID, domain.ObjectID) string); ok {
65		r0 = returnFunc(ctx, repo, objects, old, new)
66	} else {
67		r0 = ret.Get(0).(string)
68	}
69	if returnFunc, ok := ret.Get(1).(func(context.Context, domain.RepoName, ports.PushObjects, domain.ObjectID, domain.ObjectID) error); ok {
70		r1 = returnFunc(ctx, repo, objects, old, new)
71	} else {
72		r1 = ret.Error(1)
73	}
74	return r0, r1
75}
76
77// PushTreeReader_FirstDifferentEntry_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FirstDifferentEntry'
78type PushTreeReader_FirstDifferentEntry_Call struct {
79	*mock.Call
80}
81
82// FirstDifferentEntry is a helper method to define mock.On call
83//   - ctx context.Context
84//   - repo domain.RepoName
85//   - objects ports.PushObjects
86//   - old domain.ObjectID
87//   - new domain.ObjectID
88func (_e *PushTreeReader_Expecter) FirstDifferentEntry(ctx any, repo any, objects any, old any, new any) *PushTreeReader_FirstDifferentEntry_Call {
89	return &PushTreeReader_FirstDifferentEntry_Call{Call: _e.mock.On("FirstDifferentEntry", ctx, repo, objects, old, new)}
90}
91
92func (_c *PushTreeReader_FirstDifferentEntry_Call) Run(run func(ctx context.Context, repo domain.RepoName, objects ports.PushObjects, old domain.ObjectID, new domain.ObjectID)) *PushTreeReader_FirstDifferentEntry_Call {
93	_c.Call.Run(func(args mock.Arguments) {
94		var arg0 context.Context
95		if args[0] != nil {
96			arg0 = args[0].(context.Context)
97		}
98		var arg1 domain.RepoName
99		if args[1] != nil {
100			arg1 = args[1].(domain.RepoName)
101		}
102		var arg2 ports.PushObjects
103		if args[2] != nil {
104			arg2 = args[2].(ports.PushObjects)
105		}
106		var arg3 domain.ObjectID
107		if args[3] != nil {
108			arg3 = args[3].(domain.ObjectID)
109		}
110		var arg4 domain.ObjectID
111		if args[4] != nil {
112			arg4 = args[4].(domain.ObjectID)
113		}
114		run(
115			arg0,
116			arg1,
117			arg2,
118			arg3,
119			arg4,
120		)
121	})
122	return _c
123}
124
125func (_c *PushTreeReader_FirstDifferentEntry_Call) Return(name string, err error) *PushTreeReader_FirstDifferentEntry_Call {
126	_c.Call.Return(name, err)
127	return _c
128}
129
130func (_c *PushTreeReader_FirstDifferentEntry_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName, objects ports.PushObjects, old domain.ObjectID, new domain.ObjectID) (string, error)) *PushTreeReader_FirstDifferentEntry_Call {
131	_c.Call.Return(run)
132	return _c
133}
134
135// PushSubtrees provides a mock function for the type PushTreeReader
136func (_mock *PushTreeReader) PushSubtrees(ctx context.Context, repo domain.RepoName, updates []domain.RefUpdate, objects ports.PushObjects, path string, bounds domain.PushWalkBounds) (domain.PushSubtrees, error) {
137	ret := _mock.Called(ctx, repo, updates, objects, path, bounds)
138
139	if len(ret) == 0 {
140		panic("no return value specified for PushSubtrees")
141	}
142
143	var r0 domain.PushSubtrees
144	var r1 error
145	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, []domain.RefUpdate, ports.PushObjects, string, domain.PushWalkBounds) (domain.PushSubtrees, error)); ok {
146		return returnFunc(ctx, repo, updates, objects, path, bounds)
147	}
148	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, []domain.RefUpdate, ports.PushObjects, string, domain.PushWalkBounds) domain.PushSubtrees); ok {
149		r0 = returnFunc(ctx, repo, updates, objects, path, bounds)
150	} else {
151		r0 = ret.Get(0).(domain.PushSubtrees)
152	}
153	if returnFunc, ok := ret.Get(1).(func(context.Context, domain.RepoName, []domain.RefUpdate, ports.PushObjects, string, domain.PushWalkBounds) error); ok {
154		r1 = returnFunc(ctx, repo, updates, objects, path, bounds)
155	} else {
156		r1 = ret.Error(1)
157	}
158	return r0, r1
159}
160
161// PushTreeReader_PushSubtrees_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PushSubtrees'
162type PushTreeReader_PushSubtrees_Call struct {
163	*mock.Call
164}
165
166// PushSubtrees is a helper method to define mock.On call
167//   - ctx context.Context
168//   - repo domain.RepoName
169//   - updates []domain.RefUpdate
170//   - objects ports.PushObjects
171//   - path string
172//   - bounds domain.PushWalkBounds
173func (_e *PushTreeReader_Expecter) PushSubtrees(ctx any, repo any, updates any, objects any, path any, bounds any) *PushTreeReader_PushSubtrees_Call {
174	return &PushTreeReader_PushSubtrees_Call{Call: _e.mock.On("PushSubtrees", ctx, repo, updates, objects, path, bounds)}
175}
176
177func (_c *PushTreeReader_PushSubtrees_Call) Run(run func(ctx context.Context, repo domain.RepoName, updates []domain.RefUpdate, objects ports.PushObjects, path string, bounds domain.PushWalkBounds)) *PushTreeReader_PushSubtrees_Call {
178	_c.Call.Run(func(args mock.Arguments) {
179		var arg0 context.Context
180		if args[0] != nil {
181			arg0 = args[0].(context.Context)
182		}
183		var arg1 domain.RepoName
184		if args[1] != nil {
185			arg1 = args[1].(domain.RepoName)
186		}
187		var arg2 []domain.RefUpdate
188		if args[2] != nil {
189			arg2 = args[2].([]domain.RefUpdate)
190		}
191		var arg3 ports.PushObjects
192		if args[3] != nil {
193			arg3 = args[3].(ports.PushObjects)
194		}
195		var arg4 string
196		if args[4] != nil {
197			arg4 = args[4].(string)
198		}
199		var arg5 domain.PushWalkBounds
200		if args[5] != nil {
201			arg5 = args[5].(domain.PushWalkBounds)
202		}
203		run(
204			arg0,
205			arg1,
206			arg2,
207			arg3,
208			arg4,
209			arg5,
210		)
211	})
212	return _c
213}
214
215func (_c *PushTreeReader_PushSubtrees_Call) Return(pushSubtrees domain.PushSubtrees, err error) *PushTreeReader_PushSubtrees_Call {
216	_c.Call.Return(pushSubtrees, err)
217	return _c
218}
219
220func (_c *PushTreeReader_PushSubtrees_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName, updates []domain.RefUpdate, objects ports.PushObjects, path string, bounds domain.PushWalkBounds) (domain.PushSubtrees, error)) *PushTreeReader_PushSubtrees_Call {
221	_c.Call.Return(run)
222	return _c
223}

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 3

Tags 44

↑↓ moveenter openesc close