detached 5278df2

MergeGit.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	mock "github.com/stretchr/testify/mock"
12)
13
14// NewMergeGit creates a new instance of MergeGit. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
15// The first argument is typically a *testing.T value.
16func NewMergeGit(t interface {
17	mock.TestingT
18	Cleanup(func())
19}) *MergeGit {
20	if helper, ok := t.(interface{ Helper() }); ok {
21		helper.Helper()
22	}
23
24	mock := &MergeGit{}
25	mock.Mock.Test(t)
26
27	t.Cleanup(func() {
28		if helper, ok := t.(interface{ Helper() }); ok {
29			helper.Helper()
30		}
31		mock.AssertExpectations(t)
32	})
33
34	return mock
35}
36
37// MergeGit is an autogenerated mock type for the MergeGit type
38type MergeGit struct {
39	mock.Mock
40}
41
42type MergeGit_Expecter struct {
43	mock *mock.Mock
44}
45
46func (_m *MergeGit) EXPECT() *MergeGit_Expecter {
47	return &MergeGit_Expecter{mock: &_m.Mock}
48}
49
50// BranchHead provides a mock function for the type MergeGit
51func (_mock *MergeGit) BranchHead(ctx context.Context, repo domain.RepoName, branch string) (domain.ObjectID, error) {
52	ret := _mock.Called(ctx, repo, branch)
53
54	if len(ret) == 0 {
55		panic("no return value specified for BranchHead")
56	}
57
58	var r0 domain.ObjectID
59	var r1 error
60	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, string) (domain.ObjectID, error)); ok {
61		return returnFunc(ctx, repo, branch)
62	}
63	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, string) domain.ObjectID); ok {
64		r0 = returnFunc(ctx, repo, branch)
65	} else {
66		r0 = ret.Get(0).(domain.ObjectID)
67	}
68	if returnFunc, ok := ret.Get(1).(func(context.Context, domain.RepoName, string) error); ok {
69		r1 = returnFunc(ctx, repo, branch)
70	} else {
71		r1 = ret.Error(1)
72	}
73	return r0, r1
74}
75
76// MergeGit_BranchHead_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BranchHead'
77type MergeGit_BranchHead_Call struct {
78	*mock.Call
79}
80
81// BranchHead is a helper method to define mock.On call
82//   - ctx context.Context
83//   - repo domain.RepoName
84//   - branch string
85func (_e *MergeGit_Expecter) BranchHead(ctx any, repo any, branch any) *MergeGit_BranchHead_Call {
86	return &MergeGit_BranchHead_Call{Call: _e.mock.On("BranchHead", ctx, repo, branch)}
87}
88
89func (_c *MergeGit_BranchHead_Call) Run(run func(ctx context.Context, repo domain.RepoName, branch string)) *MergeGit_BranchHead_Call {
90	_c.Call.Run(func(args mock.Arguments) {
91		var arg0 context.Context
92		if args[0] != nil {
93			arg0 = args[0].(context.Context)
94		}
95		var arg1 domain.RepoName
96		if args[1] != nil {
97			arg1 = args[1].(domain.RepoName)
98		}
99		var arg2 string
100		if args[2] != nil {
101			arg2 = args[2].(string)
102		}
103		run(
104			arg0,
105			arg1,
106			arg2,
107		)
108	})
109	return _c
110}
111
112func (_c *MergeGit_BranchHead_Call) Return(objectID domain.ObjectID, err error) *MergeGit_BranchHead_Call {
113	_c.Call.Return(objectID, err)
114	return _c
115}
116
117func (_c *MergeGit_BranchHead_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName, branch string) (domain.ObjectID, error)) *MergeGit_BranchHead_Call {
118	_c.Call.Return(run)
119	return _c
120}
121
122// CommitTree provides a mock function for the type MergeGit
123func (_mock *MergeGit) CommitTree(ctx context.Context, repo domain.RepoName, id domain.ObjectID) (domain.ObjectID, error) {
124	ret := _mock.Called(ctx, repo, id)
125
126	if len(ret) == 0 {
127		panic("no return value specified for CommitTree")
128	}
129
130	var r0 domain.ObjectID
131	var r1 error
132	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, domain.ObjectID) (domain.ObjectID, error)); ok {
133		return returnFunc(ctx, repo, id)
134	}
135	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, domain.ObjectID) domain.ObjectID); ok {
136		r0 = returnFunc(ctx, repo, id)
137	} else {
138		r0 = ret.Get(0).(domain.ObjectID)
139	}
140	if returnFunc, ok := ret.Get(1).(func(context.Context, domain.RepoName, domain.ObjectID) error); ok {
141		r1 = returnFunc(ctx, repo, id)
142	} else {
143		r1 = ret.Error(1)
144	}
145	return r0, r1
146}
147
148// MergeGit_CommitTree_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CommitTree'
149type MergeGit_CommitTree_Call struct {
150	*mock.Call
151}
152
153// CommitTree is a helper method to define mock.On call
154//   - ctx context.Context
155//   - repo domain.RepoName
156//   - id domain.ObjectID
157func (_e *MergeGit_Expecter) CommitTree(ctx any, repo any, id any) *MergeGit_CommitTree_Call {
158	return &MergeGit_CommitTree_Call{Call: _e.mock.On("CommitTree", ctx, repo, id)}
159}
160
161func (_c *MergeGit_CommitTree_Call) Run(run func(ctx context.Context, repo domain.RepoName, id domain.ObjectID)) *MergeGit_CommitTree_Call {
162	_c.Call.Run(func(args mock.Arguments) {
163		var arg0 context.Context
164		if args[0] != nil {
165			arg0 = args[0].(context.Context)
166		}
167		var arg1 domain.RepoName
168		if args[1] != nil {
169			arg1 = args[1].(domain.RepoName)
170		}
171		var arg2 domain.ObjectID
172		if args[2] != nil {
173			arg2 = args[2].(domain.ObjectID)
174		}
175		run(
176			arg0,
177			arg1,
178			arg2,
179		)
180	})
181	return _c
182}
183
184func (_c *MergeGit_CommitTree_Call) Return(objectID domain.ObjectID, err error) *MergeGit_CommitTree_Call {
185	_c.Call.Return(objectID, err)
186	return _c
187}
188
189func (_c *MergeGit_CommitTree_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName, id domain.ObjectID) (domain.ObjectID, error)) *MergeGit_CommitTree_Call {
190	_c.Call.Return(run)
191	return _c
192}
193
194// CountBehind provides a mock function for the type MergeGit
195func (_mock *MergeGit) CountBehind(ctx context.Context, repo domain.RepoName, head domain.ObjectID, target domain.ObjectID, limit int) (int, error) {
196	ret := _mock.Called(ctx, repo, head, target, limit)
197
198	if len(ret) == 0 {
199		panic("no return value specified for CountBehind")
200	}
201
202	var r0 int
203	var r1 error
204	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, domain.ObjectID, domain.ObjectID, int) (int, error)); ok {
205		return returnFunc(ctx, repo, head, target, limit)
206	}
207	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, domain.ObjectID, domain.ObjectID, int) int); ok {
208		r0 = returnFunc(ctx, repo, head, target, limit)
209	} else {
210		r0 = ret.Get(0).(int)
211	}
212	if returnFunc, ok := ret.Get(1).(func(context.Context, domain.RepoName, domain.ObjectID, domain.ObjectID, int) error); ok {
213		r1 = returnFunc(ctx, repo, head, target, limit)
214	} else {
215		r1 = ret.Error(1)
216	}
217	return r0, r1
218}
219
220// MergeGit_CountBehind_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CountBehind'
221type MergeGit_CountBehind_Call struct {
222	*mock.Call
223}
224
225// CountBehind is a helper method to define mock.On call
226//   - ctx context.Context
227//   - repo domain.RepoName
228//   - head domain.ObjectID
229//   - target domain.ObjectID
230//   - limit int
231func (_e *MergeGit_Expecter) CountBehind(ctx any, repo any, head any, target any, limit any) *MergeGit_CountBehind_Call {
232	return &MergeGit_CountBehind_Call{Call: _e.mock.On("CountBehind", ctx, repo, head, target, limit)}
233}
234
235func (_c *MergeGit_CountBehind_Call) Run(run func(ctx context.Context, repo domain.RepoName, head domain.ObjectID, target domain.ObjectID, limit int)) *MergeGit_CountBehind_Call {
236	_c.Call.Run(func(args mock.Arguments) {
237		var arg0 context.Context
238		if args[0] != nil {
239			arg0 = args[0].(context.Context)
240		}
241		var arg1 domain.RepoName
242		if args[1] != nil {
243			arg1 = args[1].(domain.RepoName)
244		}
245		var arg2 domain.ObjectID
246		if args[2] != nil {
247			arg2 = args[2].(domain.ObjectID)
248		}
249		var arg3 domain.ObjectID
250		if args[3] != nil {
251			arg3 = args[3].(domain.ObjectID)
252		}
253		var arg4 int
254		if args[4] != nil {
255			arg4 = args[4].(int)
256		}
257		run(
258			arg0,
259			arg1,
260			arg2,
261			arg3,
262			arg4,
263		)
264	})
265	return _c
266}
267
268func (_c *MergeGit_CountBehind_Call) Return(n int, err error) *MergeGit_CountBehind_Call {
269	_c.Call.Return(n, err)
270	return _c
271}
272
273func (_c *MergeGit_CountBehind_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName, head domain.ObjectID, target domain.ObjectID, limit int) (int, error)) *MergeGit_CountBehind_Call {
274	_c.Call.Return(run)
275	return _c
276}
277
278// DeleteBranch provides a mock function for the type MergeGit
279func (_mock *MergeGit) DeleteBranch(ctx context.Context, repo domain.RepoName, branch string, old domain.ObjectID) error {
280	ret := _mock.Called(ctx, repo, branch, old)
281
282	if len(ret) == 0 {
283		panic("no return value specified for DeleteBranch")
284	}
285
286	var r0 error
287	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, string, domain.ObjectID) error); ok {
288		r0 = returnFunc(ctx, repo, branch, old)
289	} else {
290		r0 = ret.Error(0)
291	}
292	return r0
293}
294
295// MergeGit_DeleteBranch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteBranch'
296type MergeGit_DeleteBranch_Call struct {
297	*mock.Call
298}
299
300// DeleteBranch is a helper method to define mock.On call
301//   - ctx context.Context
302//   - repo domain.RepoName
303//   - branch string
304//   - old domain.ObjectID
305func (_e *MergeGit_Expecter) DeleteBranch(ctx any, repo any, branch any, old any) *MergeGit_DeleteBranch_Call {
306	return &MergeGit_DeleteBranch_Call{Call: _e.mock.On("DeleteBranch", ctx, repo, branch, old)}
307}
308
309func (_c *MergeGit_DeleteBranch_Call) Run(run func(ctx context.Context, repo domain.RepoName, branch string, old domain.ObjectID)) *MergeGit_DeleteBranch_Call {
310	_c.Call.Run(func(args mock.Arguments) {
311		var arg0 context.Context
312		if args[0] != nil {
313			arg0 = args[0].(context.Context)
314		}
315		var arg1 domain.RepoName
316		if args[1] != nil {
317			arg1 = args[1].(domain.RepoName)
318		}
319		var arg2 string
320		if args[2] != nil {
321			arg2 = args[2].(string)
322		}
323		var arg3 domain.ObjectID
324		if args[3] != nil {
325			arg3 = args[3].(domain.ObjectID)
326		}
327		run(
328			arg0,
329			arg1,
330			arg2,
331			arg3,
332		)
333	})
334	return _c
335}
336
337func (_c *MergeGit_DeleteBranch_Call) Return(err error) *MergeGit_DeleteBranch_Call {
338	_c.Call.Return(err)
339	return _c
340}
341
342func (_c *MergeGit_DeleteBranch_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName, branch string, old domain.ObjectID) error) *MergeGit_DeleteBranch_Call {
343	_c.Call.Return(run)
344	return _c
345}
346
347// DiffCommits provides a mock function for the type MergeGit
348func (_mock *MergeGit) DiffCommits(ctx context.Context, repo domain.RepoName, base domain.ObjectID, head domain.ObjectID, limits domain.DiffLimits) (domain.DiffStats, domain.Diff, error) {
349	ret := _mock.Called(ctx, repo, base, head, limits)
350
351	if len(ret) == 0 {
352		panic("no return value specified for DiffCommits")
353	}
354
355	var r0 domain.DiffStats
356	var r1 domain.Diff
357	var r2 error
358	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, domain.ObjectID, domain.ObjectID, domain.DiffLimits) (domain.DiffStats, domain.Diff, error)); ok {
359		return returnFunc(ctx, repo, base, head, limits)
360	}
361	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, domain.ObjectID, domain.ObjectID, domain.DiffLimits) domain.DiffStats); ok {
362		r0 = returnFunc(ctx, repo, base, head, limits)
363	} else {
364		r0 = ret.Get(0).(domain.DiffStats)
365	}
366	if returnFunc, ok := ret.Get(1).(func(context.Context, domain.RepoName, domain.ObjectID, domain.ObjectID, domain.DiffLimits) domain.Diff); ok {
367		r1 = returnFunc(ctx, repo, base, head, limits)
368	} else {
369		r1 = ret.Get(1).(domain.Diff)
370	}
371	if returnFunc, ok := ret.Get(2).(func(context.Context, domain.RepoName, domain.ObjectID, domain.ObjectID, domain.DiffLimits) error); ok {
372		r2 = returnFunc(ctx, repo, base, head, limits)
373	} else {
374		r2 = ret.Error(2)
375	}
376	return r0, r1, r2
377}
378
379// MergeGit_DiffCommits_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DiffCommits'
380type MergeGit_DiffCommits_Call struct {
381	*mock.Call
382}
383
384// DiffCommits is a helper method to define mock.On call
385//   - ctx context.Context
386//   - repo domain.RepoName
387//   - base domain.ObjectID
388//   - head domain.ObjectID
389//   - limits domain.DiffLimits
390func (_e *MergeGit_Expecter) DiffCommits(ctx any, repo any, base any, head any, limits any) *MergeGit_DiffCommits_Call {
391	return &MergeGit_DiffCommits_Call{Call: _e.mock.On("DiffCommits", ctx, repo, base, head, limits)}
392}
393
394func (_c *MergeGit_DiffCommits_Call) Run(run func(ctx context.Context, repo domain.RepoName, base domain.ObjectID, head domain.ObjectID, limits domain.DiffLimits)) *MergeGit_DiffCommits_Call {
395	_c.Call.Run(func(args mock.Arguments) {
396		var arg0 context.Context
397		if args[0] != nil {
398			arg0 = args[0].(context.Context)
399		}
400		var arg1 domain.RepoName
401		if args[1] != nil {
402			arg1 = args[1].(domain.RepoName)
403		}
404		var arg2 domain.ObjectID
405		if args[2] != nil {
406			arg2 = args[2].(domain.ObjectID)
407		}
408		var arg3 domain.ObjectID
409		if args[3] != nil {
410			arg3 = args[3].(domain.ObjectID)
411		}
412		var arg4 domain.DiffLimits
413		if args[4] != nil {
414			arg4 = args[4].(domain.DiffLimits)
415		}
416		run(
417			arg0,
418			arg1,
419			arg2,
420			arg3,
421			arg4,
422		)
423	})
424	return _c
425}
426
427func (_c *MergeGit_DiffCommits_Call) Return(diffStats domain.DiffStats, diff domain.Diff, err error) *MergeGit_DiffCommits_Call {
428	_c.Call.Return(diffStats, diff, err)
429	return _c
430}
431
432func (_c *MergeGit_DiffCommits_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName, base domain.ObjectID, head domain.ObjectID, limits domain.DiffLimits) (domain.DiffStats, domain.Diff, error)) *MergeGit_DiffCommits_Call {
433	_c.Call.Return(run)
434	return _c
435}
436
437// HasCommit provides a mock function for the type MergeGit
438func (_mock *MergeGit) HasCommit(ctx context.Context, repo domain.RepoName, id domain.ObjectID) (bool, error) {
439	ret := _mock.Called(ctx, repo, id)
440
441	if len(ret) == 0 {
442		panic("no return value specified for HasCommit")
443	}
444
445	var r0 bool
446	var r1 error
447	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, domain.ObjectID) (bool, error)); ok {
448		return returnFunc(ctx, repo, id)
449	}
450	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, domain.ObjectID) bool); ok {
451		r0 = returnFunc(ctx, repo, id)
452	} else {
453		r0 = ret.Get(0).(bool)
454	}
455	if returnFunc, ok := ret.Get(1).(func(context.Context, domain.RepoName, domain.ObjectID) error); ok {
456		r1 = returnFunc(ctx, repo, id)
457	} else {
458		r1 = ret.Error(1)
459	}
460	return r0, r1
461}
462
463// MergeGit_HasCommit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HasCommit'
464type MergeGit_HasCommit_Call struct {
465	*mock.Call
466}
467
468// HasCommit is a helper method to define mock.On call
469//   - ctx context.Context
470//   - repo domain.RepoName
471//   - id domain.ObjectID
472func (_e *MergeGit_Expecter) HasCommit(ctx any, repo any, id any) *MergeGit_HasCommit_Call {
473	return &MergeGit_HasCommit_Call{Call: _e.mock.On("HasCommit", ctx, repo, id)}
474}
475
476func (_c *MergeGit_HasCommit_Call) Run(run func(ctx context.Context, repo domain.RepoName, id domain.ObjectID)) *MergeGit_HasCommit_Call {
477	_c.Call.Run(func(args mock.Arguments) {
478		var arg0 context.Context
479		if args[0] != nil {
480			arg0 = args[0].(context.Context)
481		}
482		var arg1 domain.RepoName
483		if args[1] != nil {
484			arg1 = args[1].(domain.RepoName)
485		}
486		var arg2 domain.ObjectID
487		if args[2] != nil {
488			arg2 = args[2].(domain.ObjectID)
489		}
490		run(
491			arg0,
492			arg1,
493			arg2,
494		)
495	})
496	return _c
497}
498
499func (_c *MergeGit_HasCommit_Call) Return(b bool, err error) *MergeGit_HasCommit_Call {
500	_c.Call.Return(b, err)
501	return _c
502}
503
504func (_c *MergeGit_HasCommit_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName, id domain.ObjectID) (bool, error)) *MergeGit_HasCommit_Call {
505	_c.Call.Return(run)
506	return _c
507}
508
509// IsAncestor provides a mock function for the type MergeGit
510func (_mock *MergeGit) IsAncestor(ctx context.Context, repo domain.RepoName, ancestor domain.ObjectID, descendant domain.ObjectID) (bool, error) {
511	ret := _mock.Called(ctx, repo, ancestor, descendant)
512
513	if len(ret) == 0 {
514		panic("no return value specified for IsAncestor")
515	}
516
517	var r0 bool
518	var r1 error
519	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, domain.ObjectID, domain.ObjectID) (bool, error)); ok {
520		return returnFunc(ctx, repo, ancestor, descendant)
521	}
522	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, domain.ObjectID, domain.ObjectID) bool); ok {
523		r0 = returnFunc(ctx, repo, ancestor, descendant)
524	} else {
525		r0 = ret.Get(0).(bool)
526	}
527	if returnFunc, ok := ret.Get(1).(func(context.Context, domain.RepoName, domain.ObjectID, domain.ObjectID) error); ok {
528		r1 = returnFunc(ctx, repo, ancestor, descendant)
529	} else {
530		r1 = ret.Error(1)
531	}
532	return r0, r1
533}
534
535// MergeGit_IsAncestor_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsAncestor'
536type MergeGit_IsAncestor_Call struct {
537	*mock.Call
538}
539
540// IsAncestor is a helper method to define mock.On call
541//   - ctx context.Context
542//   - repo domain.RepoName
543//   - ancestor domain.ObjectID
544//   - descendant domain.ObjectID
545func (_e *MergeGit_Expecter) IsAncestor(ctx any, repo any, ancestor any, descendant any) *MergeGit_IsAncestor_Call {
546	return &MergeGit_IsAncestor_Call{Call: _e.mock.On("IsAncestor", ctx, repo, ancestor, descendant)}
547}
548
549func (_c *MergeGit_IsAncestor_Call) Run(run func(ctx context.Context, repo domain.RepoName, ancestor domain.ObjectID, descendant domain.ObjectID)) *MergeGit_IsAncestor_Call {
550	_c.Call.Run(func(args mock.Arguments) {
551		var arg0 context.Context
552		if args[0] != nil {
553			arg0 = args[0].(context.Context)
554		}
555		var arg1 domain.RepoName
556		if args[1] != nil {
557			arg1 = args[1].(domain.RepoName)
558		}
559		var arg2 domain.ObjectID
560		if args[2] != nil {
561			arg2 = args[2].(domain.ObjectID)
562		}
563		var arg3 domain.ObjectID
564		if args[3] != nil {
565			arg3 = args[3].(domain.ObjectID)
566		}
567		run(
568			arg0,
569			arg1,
570			arg2,
571			arg3,
572		)
573	})
574	return _c
575}
576
577func (_c *MergeGit_IsAncestor_Call) Return(b bool, err error) *MergeGit_IsAncestor_Call {
578	_c.Call.Return(b, err)
579	return _c
580}
581
582func (_c *MergeGit_IsAncestor_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName, ancestor domain.ObjectID, descendant domain.ObjectID) (bool, error)) *MergeGit_IsAncestor_Call {
583	_c.Call.Return(run)
584	return _c
585}
586
587// ListRange provides a mock function for the type MergeGit
588func (_mock *MergeGit) ListRange(ctx context.Context, repo domain.RepoName, exclude domain.ObjectID, head domain.ObjectID, limit int) ([]domain.Commit, bool, error) {
589	ret := _mock.Called(ctx, repo, exclude, head, limit)
590
591	if len(ret) == 0 {
592		panic("no return value specified for ListRange")
593	}
594
595	var r0 []domain.Commit
596	var r1 bool
597	var r2 error
598	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, domain.ObjectID, domain.ObjectID, int) ([]domain.Commit, bool, error)); ok {
599		return returnFunc(ctx, repo, exclude, head, limit)
600	}
601	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, domain.ObjectID, domain.ObjectID, int) []domain.Commit); ok {
602		r0 = returnFunc(ctx, repo, exclude, head, limit)
603	} else {
604		if ret.Get(0) != nil {
605			r0 = ret.Get(0).([]domain.Commit)
606		}
607	}
608	if returnFunc, ok := ret.Get(1).(func(context.Context, domain.RepoName, domain.ObjectID, domain.ObjectID, int) bool); ok {
609		r1 = returnFunc(ctx, repo, exclude, head, limit)
610	} else {
611		r1 = ret.Get(1).(bool)
612	}
613	if returnFunc, ok := ret.Get(2).(func(context.Context, domain.RepoName, domain.ObjectID, domain.ObjectID, int) error); ok {
614		r2 = returnFunc(ctx, repo, exclude, head, limit)
615	} else {
616		r2 = ret.Error(2)
617	}
618	return r0, r1, r2
619}
620
621// MergeGit_ListRange_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListRange'
622type MergeGit_ListRange_Call struct {
623	*mock.Call
624}
625
626// ListRange is a helper method to define mock.On call
627//   - ctx context.Context
628//   - repo domain.RepoName
629//   - exclude domain.ObjectID
630//   - head domain.ObjectID
631//   - limit int
632func (_e *MergeGit_Expecter) ListRange(ctx any, repo any, exclude any, head any, limit any) *MergeGit_ListRange_Call {
633	return &MergeGit_ListRange_Call{Call: _e.mock.On("ListRange", ctx, repo, exclude, head, limit)}
634}
635
636func (_c *MergeGit_ListRange_Call) Run(run func(ctx context.Context, repo domain.RepoName, exclude domain.ObjectID, head domain.ObjectID, limit int)) *MergeGit_ListRange_Call {
637	_c.Call.Run(func(args mock.Arguments) {
638		var arg0 context.Context
639		if args[0] != nil {
640			arg0 = args[0].(context.Context)
641		}
642		var arg1 domain.RepoName
643		if args[1] != nil {
644			arg1 = args[1].(domain.RepoName)
645		}
646		var arg2 domain.ObjectID
647		if args[2] != nil {
648			arg2 = args[2].(domain.ObjectID)
649		}
650		var arg3 domain.ObjectID
651		if args[3] != nil {
652			arg3 = args[3].(domain.ObjectID)
653		}
654		var arg4 int
655		if args[4] != nil {
656			arg4 = args[4].(int)
657		}
658		run(
659			arg0,
660			arg1,
661			arg2,
662			arg3,
663			arg4,
664		)
665	})
666	return _c
667}
668
669func (_c *MergeGit_ListRange_Call) Return(commits []domain.Commit, more bool, err error) *MergeGit_ListRange_Call {
670	_c.Call.Return(commits, more, err)
671	return _c
672}
673
674func (_c *MergeGit_ListRange_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName, exclude domain.ObjectID, head domain.ObjectID, limit int) ([]domain.Commit, bool, error)) *MergeGit_ListRange_Call {
675	_c.Call.Return(run)
676	return _c
677}
678
679// MergeBase provides a mock function for the type MergeGit
680func (_mock *MergeGit) MergeBase(ctx context.Context, repo domain.RepoName, a domain.ObjectID, b domain.ObjectID) (domain.ObjectID, error) {
681	ret := _mock.Called(ctx, repo, a, b)
682
683	if len(ret) == 0 {
684		panic("no return value specified for MergeBase")
685	}
686
687	var r0 domain.ObjectID
688	var r1 error
689	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, domain.ObjectID, domain.ObjectID) (domain.ObjectID, error)); ok {
690		return returnFunc(ctx, repo, a, b)
691	}
692	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, domain.ObjectID, domain.ObjectID) domain.ObjectID); ok {
693		r0 = returnFunc(ctx, repo, a, b)
694	} else {
695		r0 = ret.Get(0).(domain.ObjectID)
696	}
697	if returnFunc, ok := ret.Get(1).(func(context.Context, domain.RepoName, domain.ObjectID, domain.ObjectID) error); ok {
698		r1 = returnFunc(ctx, repo, a, b)
699	} else {
700		r1 = ret.Error(1)
701	}
702	return r0, r1
703}
704
705// MergeGit_MergeBase_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MergeBase'
706type MergeGit_MergeBase_Call struct {
707	*mock.Call
708}
709
710// MergeBase is a helper method to define mock.On call
711//   - ctx context.Context
712//   - repo domain.RepoName
713//   - a domain.ObjectID
714//   - b domain.ObjectID
715func (_e *MergeGit_Expecter) MergeBase(ctx any, repo any, a any, b any) *MergeGit_MergeBase_Call {
716	return &MergeGit_MergeBase_Call{Call: _e.mock.On("MergeBase", ctx, repo, a, b)}
717}
718
719func (_c *MergeGit_MergeBase_Call) Run(run func(ctx context.Context, repo domain.RepoName, a domain.ObjectID, b domain.ObjectID)) *MergeGit_MergeBase_Call {
720	_c.Call.Run(func(args mock.Arguments) {
721		var arg0 context.Context
722		if args[0] != nil {
723			arg0 = args[0].(context.Context)
724		}
725		var arg1 domain.RepoName
726		if args[1] != nil {
727			arg1 = args[1].(domain.RepoName)
728		}
729		var arg2 domain.ObjectID
730		if args[2] != nil {
731			arg2 = args[2].(domain.ObjectID)
732		}
733		var arg3 domain.ObjectID
734		if args[3] != nil {
735			arg3 = args[3].(domain.ObjectID)
736		}
737		run(
738			arg0,
739			arg1,
740			arg2,
741			arg3,
742		)
743	})
744	return _c
745}
746
747func (_c *MergeGit_MergeBase_Call) Return(objectID domain.ObjectID, err error) *MergeGit_MergeBase_Call {
748	_c.Call.Return(objectID, err)
749	return _c
750}
751
752func (_c *MergeGit_MergeBase_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName, a domain.ObjectID, b domain.ObjectID) (domain.ObjectID, error)) *MergeGit_MergeBase_Call {
753	_c.Call.Return(run)
754	return _c
755}
756
757// MergeTree provides a mock function for the type MergeGit
758func (_mock *MergeGit) MergeTree(ctx context.Context, repo domain.RepoName, base domain.ObjectID, head domain.ObjectID) (domain.MergeTreeResult, error) {
759	ret := _mock.Called(ctx, repo, base, head)
760
761	if len(ret) == 0 {
762		panic("no return value specified for MergeTree")
763	}
764
765	var r0 domain.MergeTreeResult
766	var r1 error
767	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, domain.ObjectID, domain.ObjectID) (domain.MergeTreeResult, error)); ok {
768		return returnFunc(ctx, repo, base, head)
769	}
770	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, domain.ObjectID, domain.ObjectID) domain.MergeTreeResult); ok {
771		r0 = returnFunc(ctx, repo, base, head)
772	} else {
773		r0 = ret.Get(0).(domain.MergeTreeResult)
774	}
775	if returnFunc, ok := ret.Get(1).(func(context.Context, domain.RepoName, domain.ObjectID, domain.ObjectID) error); ok {
776		r1 = returnFunc(ctx, repo, base, head)
777	} else {
778		r1 = ret.Error(1)
779	}
780	return r0, r1
781}
782
783// MergeGit_MergeTree_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MergeTree'
784type MergeGit_MergeTree_Call struct {
785	*mock.Call
786}
787
788// MergeTree is a helper method to define mock.On call
789//   - ctx context.Context
790//   - repo domain.RepoName
791//   - base domain.ObjectID
792//   - head domain.ObjectID
793func (_e *MergeGit_Expecter) MergeTree(ctx any, repo any, base any, head any) *MergeGit_MergeTree_Call {
794	return &MergeGit_MergeTree_Call{Call: _e.mock.On("MergeTree", ctx, repo, base, head)}
795}
796
797func (_c *MergeGit_MergeTree_Call) Run(run func(ctx context.Context, repo domain.RepoName, base domain.ObjectID, head domain.ObjectID)) *MergeGit_MergeTree_Call {
798	_c.Call.Run(func(args mock.Arguments) {
799		var arg0 context.Context
800		if args[0] != nil {
801			arg0 = args[0].(context.Context)
802		}
803		var arg1 domain.RepoName
804		if args[1] != nil {
805			arg1 = args[1].(domain.RepoName)
806		}
807		var arg2 domain.ObjectID
808		if args[2] != nil {
809			arg2 = args[2].(domain.ObjectID)
810		}
811		var arg3 domain.ObjectID
812		if args[3] != nil {
813			arg3 = args[3].(domain.ObjectID)
814		}
815		run(
816			arg0,
817			arg1,
818			arg2,
819			arg3,
820		)
821	})
822	return _c
823}
824
825func (_c *MergeGit_MergeTree_Call) Return(mergeTreeResult domain.MergeTreeResult, err error) *MergeGit_MergeTree_Call {
826	_c.Call.Return(mergeTreeResult, err)
827	return _c
828}
829
830func (_c *MergeGit_MergeTree_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName, base domain.ObjectID, head domain.ObjectID) (domain.MergeTreeResult, error)) *MergeGit_MergeTree_Call {
831	_c.Call.Return(run)
832	return _c
833}
834
835// UpdateBranch provides a mock function for the type MergeGit
836func (_mock *MergeGit) UpdateBranch(ctx context.Context, repo domain.RepoName, branch string, old domain.ObjectID, new domain.ObjectID) error {
837	ret := _mock.Called(ctx, repo, branch, old, new)
838
839	if len(ret) == 0 {
840		panic("no return value specified for UpdateBranch")
841	}
842
843	var r0 error
844	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, string, domain.ObjectID, domain.ObjectID) error); ok {
845		r0 = returnFunc(ctx, repo, branch, old, new)
846	} else {
847		r0 = ret.Error(0)
848	}
849	return r0
850}
851
852// MergeGit_UpdateBranch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateBranch'
853type MergeGit_UpdateBranch_Call struct {
854	*mock.Call
855}
856
857// UpdateBranch is a helper method to define mock.On call
858//   - ctx context.Context
859//   - repo domain.RepoName
860//   - branch string
861//   - old domain.ObjectID
862//   - new domain.ObjectID
863func (_e *MergeGit_Expecter) UpdateBranch(ctx any, repo any, branch any, old any, new any) *MergeGit_UpdateBranch_Call {
864	return &MergeGit_UpdateBranch_Call{Call: _e.mock.On("UpdateBranch", ctx, repo, branch, old, new)}
865}
866
867func (_c *MergeGit_UpdateBranch_Call) Run(run func(ctx context.Context, repo domain.RepoName, branch string, old domain.ObjectID, new domain.ObjectID)) *MergeGit_UpdateBranch_Call {
868	_c.Call.Run(func(args mock.Arguments) {
869		var arg0 context.Context
870		if args[0] != nil {
871			arg0 = args[0].(context.Context)
872		}
873		var arg1 domain.RepoName
874		if args[1] != nil {
875			arg1 = args[1].(domain.RepoName)
876		}
877		var arg2 string
878		if args[2] != nil {
879			arg2 = args[2].(string)
880		}
881		var arg3 domain.ObjectID
882		if args[3] != nil {
883			arg3 = args[3].(domain.ObjectID)
884		}
885		var arg4 domain.ObjectID
886		if args[4] != nil {
887			arg4 = args[4].(domain.ObjectID)
888		}
889		run(
890			arg0,
891			arg1,
892			arg2,
893			arg3,
894			arg4,
895		)
896	})
897	return _c
898}
899
900func (_c *MergeGit_UpdateBranch_Call) Return(err error) *MergeGit_UpdateBranch_Call {
901	_c.Call.Return(err)
902	return _c
903}
904
905func (_c *MergeGit_UpdateBranch_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName, branch string, old domain.ObjectID, new domain.ObjectID) error) *MergeGit_UpdateBranch_Call {
906	_c.Call.Return(run)
907	return _c
908}
909
910// WriteCommit provides a mock function for the type MergeGit
911func (_mock *MergeGit) WriteCommit(ctx context.Context, repo domain.RepoName, object []byte) (domain.ObjectID, error) {
912	ret := _mock.Called(ctx, repo, object)
913
914	if len(ret) == 0 {
915		panic("no return value specified for WriteCommit")
916	}
917
918	var r0 domain.ObjectID
919	var r1 error
920	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, []byte) (domain.ObjectID, error)); ok {
921		return returnFunc(ctx, repo, object)
922	}
923	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, []byte) domain.ObjectID); ok {
924		r0 = returnFunc(ctx, repo, object)
925	} else {
926		r0 = ret.Get(0).(domain.ObjectID)
927	}
928	if returnFunc, ok := ret.Get(1).(func(context.Context, domain.RepoName, []byte) error); ok {
929		r1 = returnFunc(ctx, repo, object)
930	} else {
931		r1 = ret.Error(1)
932	}
933	return r0, r1
934}
935
936// MergeGit_WriteCommit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WriteCommit'
937type MergeGit_WriteCommit_Call struct {
938	*mock.Call
939}
940
941// WriteCommit is a helper method to define mock.On call
942//   - ctx context.Context
943//   - repo domain.RepoName
944//   - object []byte
945func (_e *MergeGit_Expecter) WriteCommit(ctx any, repo any, object any) *MergeGit_WriteCommit_Call {
946	return &MergeGit_WriteCommit_Call{Call: _e.mock.On("WriteCommit", ctx, repo, object)}
947}
948
949func (_c *MergeGit_WriteCommit_Call) Run(run func(ctx context.Context, repo domain.RepoName, object []byte)) *MergeGit_WriteCommit_Call {
950	_c.Call.Run(func(args mock.Arguments) {
951		var arg0 context.Context
952		if args[0] != nil {
953			arg0 = args[0].(context.Context)
954		}
955		var arg1 domain.RepoName
956		if args[1] != nil {
957			arg1 = args[1].(domain.RepoName)
958		}
959		var arg2 []byte
960		if args[2] != nil {
961			arg2 = args[2].([]byte)
962		}
963		run(
964			arg0,
965			arg1,
966			arg2,
967		)
968	})
969	return _c
970}
971
972func (_c *MergeGit_WriteCommit_Call) Return(objectID domain.ObjectID, err error) *MergeGit_WriteCommit_Call {
973	_c.Call.Return(objectID, err)
974	return _c
975}
976
977func (_c *MergeGit_WriteCommit_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName, object []byte) (domain.ObjectID, error)) *MergeGit_WriteCommit_Call {
978	_c.Call.Return(run)
979	return _c
980}

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 4

Tags 45

↑↓ moveenter openesc close