v0.26.0 df1db36

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// DeleteBranch provides a mock function for the type MergeGit
195func (_mock *MergeGit) DeleteBranch(ctx context.Context, repo domain.RepoName, branch string, old domain.ObjectID) error {
196	ret := _mock.Called(ctx, repo, branch, old)
197
198	if len(ret) == 0 {
199		panic("no return value specified for DeleteBranch")
200	}
201
202	var r0 error
203	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, string, domain.ObjectID) error); ok {
204		r0 = returnFunc(ctx, repo, branch, old)
205	} else {
206		r0 = ret.Error(0)
207	}
208	return r0
209}
210
211// MergeGit_DeleteBranch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteBranch'
212type MergeGit_DeleteBranch_Call struct {
213	*mock.Call
214}
215
216// DeleteBranch is a helper method to define mock.On call
217//   - ctx context.Context
218//   - repo domain.RepoName
219//   - branch string
220//   - old domain.ObjectID
221func (_e *MergeGit_Expecter) DeleteBranch(ctx any, repo any, branch any, old any) *MergeGit_DeleteBranch_Call {
222	return &MergeGit_DeleteBranch_Call{Call: _e.mock.On("DeleteBranch", ctx, repo, branch, old)}
223}
224
225func (_c *MergeGit_DeleteBranch_Call) Run(run func(ctx context.Context, repo domain.RepoName, branch string, old domain.ObjectID)) *MergeGit_DeleteBranch_Call {
226	_c.Call.Run(func(args mock.Arguments) {
227		var arg0 context.Context
228		if args[0] != nil {
229			arg0 = args[0].(context.Context)
230		}
231		var arg1 domain.RepoName
232		if args[1] != nil {
233			arg1 = args[1].(domain.RepoName)
234		}
235		var arg2 string
236		if args[2] != nil {
237			arg2 = args[2].(string)
238		}
239		var arg3 domain.ObjectID
240		if args[3] != nil {
241			arg3 = args[3].(domain.ObjectID)
242		}
243		run(
244			arg0,
245			arg1,
246			arg2,
247			arg3,
248		)
249	})
250	return _c
251}
252
253func (_c *MergeGit_DeleteBranch_Call) Return(err error) *MergeGit_DeleteBranch_Call {
254	_c.Call.Return(err)
255	return _c
256}
257
258func (_c *MergeGit_DeleteBranch_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName, branch string, old domain.ObjectID) error) *MergeGit_DeleteBranch_Call {
259	_c.Call.Return(run)
260	return _c
261}
262
263// DiffCommits provides a mock function for the type MergeGit
264func (_mock *MergeGit) DiffCommits(ctx context.Context, repo domain.RepoName, base domain.ObjectID, head domain.ObjectID, limits domain.DiffLimits) (domain.DiffStats, domain.Diff, error) {
265	ret := _mock.Called(ctx, repo, base, head, limits)
266
267	if len(ret) == 0 {
268		panic("no return value specified for DiffCommits")
269	}
270
271	var r0 domain.DiffStats
272	var r1 domain.Diff
273	var r2 error
274	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, domain.ObjectID, domain.ObjectID, domain.DiffLimits) (domain.DiffStats, domain.Diff, error)); ok {
275		return returnFunc(ctx, repo, base, head, limits)
276	}
277	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, domain.ObjectID, domain.ObjectID, domain.DiffLimits) domain.DiffStats); ok {
278		r0 = returnFunc(ctx, repo, base, head, limits)
279	} else {
280		r0 = ret.Get(0).(domain.DiffStats)
281	}
282	if returnFunc, ok := ret.Get(1).(func(context.Context, domain.RepoName, domain.ObjectID, domain.ObjectID, domain.DiffLimits) domain.Diff); ok {
283		r1 = returnFunc(ctx, repo, base, head, limits)
284	} else {
285		r1 = ret.Get(1).(domain.Diff)
286	}
287	if returnFunc, ok := ret.Get(2).(func(context.Context, domain.RepoName, domain.ObjectID, domain.ObjectID, domain.DiffLimits) error); ok {
288		r2 = returnFunc(ctx, repo, base, head, limits)
289	} else {
290		r2 = ret.Error(2)
291	}
292	return r0, r1, r2
293}
294
295// MergeGit_DiffCommits_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DiffCommits'
296type MergeGit_DiffCommits_Call struct {
297	*mock.Call
298}
299
300// DiffCommits is a helper method to define mock.On call
301//   - ctx context.Context
302//   - repo domain.RepoName
303//   - base domain.ObjectID
304//   - head domain.ObjectID
305//   - limits domain.DiffLimits
306func (_e *MergeGit_Expecter) DiffCommits(ctx any, repo any, base any, head any, limits any) *MergeGit_DiffCommits_Call {
307	return &MergeGit_DiffCommits_Call{Call: _e.mock.On("DiffCommits", ctx, repo, base, head, limits)}
308}
309
310func (_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 {
311	_c.Call.Run(func(args mock.Arguments) {
312		var arg0 context.Context
313		if args[0] != nil {
314			arg0 = args[0].(context.Context)
315		}
316		var arg1 domain.RepoName
317		if args[1] != nil {
318			arg1 = args[1].(domain.RepoName)
319		}
320		var arg2 domain.ObjectID
321		if args[2] != nil {
322			arg2 = args[2].(domain.ObjectID)
323		}
324		var arg3 domain.ObjectID
325		if args[3] != nil {
326			arg3 = args[3].(domain.ObjectID)
327		}
328		var arg4 domain.DiffLimits
329		if args[4] != nil {
330			arg4 = args[4].(domain.DiffLimits)
331		}
332		run(
333			arg0,
334			arg1,
335			arg2,
336			arg3,
337			arg4,
338		)
339	})
340	return _c
341}
342
343func (_c *MergeGit_DiffCommits_Call) Return(diffStats domain.DiffStats, diff domain.Diff, err error) *MergeGit_DiffCommits_Call {
344	_c.Call.Return(diffStats, diff, err)
345	return _c
346}
347
348func (_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 {
349	_c.Call.Return(run)
350	return _c
351}
352
353// HasCommit provides a mock function for the type MergeGit
354func (_mock *MergeGit) HasCommit(ctx context.Context, repo domain.RepoName, id domain.ObjectID) (bool, error) {
355	ret := _mock.Called(ctx, repo, id)
356
357	if len(ret) == 0 {
358		panic("no return value specified for HasCommit")
359	}
360
361	var r0 bool
362	var r1 error
363	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, domain.ObjectID) (bool, error)); ok {
364		return returnFunc(ctx, repo, id)
365	}
366	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, domain.ObjectID) bool); ok {
367		r0 = returnFunc(ctx, repo, id)
368	} else {
369		r0 = ret.Get(0).(bool)
370	}
371	if returnFunc, ok := ret.Get(1).(func(context.Context, domain.RepoName, domain.ObjectID) error); ok {
372		r1 = returnFunc(ctx, repo, id)
373	} else {
374		r1 = ret.Error(1)
375	}
376	return r0, r1
377}
378
379// MergeGit_HasCommit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HasCommit'
380type MergeGit_HasCommit_Call struct {
381	*mock.Call
382}
383
384// HasCommit is a helper method to define mock.On call
385//   - ctx context.Context
386//   - repo domain.RepoName
387//   - id domain.ObjectID
388func (_e *MergeGit_Expecter) HasCommit(ctx any, repo any, id any) *MergeGit_HasCommit_Call {
389	return &MergeGit_HasCommit_Call{Call: _e.mock.On("HasCommit", ctx, repo, id)}
390}
391
392func (_c *MergeGit_HasCommit_Call) Run(run func(ctx context.Context, repo domain.RepoName, id domain.ObjectID)) *MergeGit_HasCommit_Call {
393	_c.Call.Run(func(args mock.Arguments) {
394		var arg0 context.Context
395		if args[0] != nil {
396			arg0 = args[0].(context.Context)
397		}
398		var arg1 domain.RepoName
399		if args[1] != nil {
400			arg1 = args[1].(domain.RepoName)
401		}
402		var arg2 domain.ObjectID
403		if args[2] != nil {
404			arg2 = args[2].(domain.ObjectID)
405		}
406		run(
407			arg0,
408			arg1,
409			arg2,
410		)
411	})
412	return _c
413}
414
415func (_c *MergeGit_HasCommit_Call) Return(b bool, err error) *MergeGit_HasCommit_Call {
416	_c.Call.Return(b, err)
417	return _c
418}
419
420func (_c *MergeGit_HasCommit_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName, id domain.ObjectID) (bool, error)) *MergeGit_HasCommit_Call {
421	_c.Call.Return(run)
422	return _c
423}
424
425// IsAncestor provides a mock function for the type MergeGit
426func (_mock *MergeGit) IsAncestor(ctx context.Context, repo domain.RepoName, ancestor domain.ObjectID, descendant domain.ObjectID) (bool, error) {
427	ret := _mock.Called(ctx, repo, ancestor, descendant)
428
429	if len(ret) == 0 {
430		panic("no return value specified for IsAncestor")
431	}
432
433	var r0 bool
434	var r1 error
435	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, domain.ObjectID, domain.ObjectID) (bool, error)); ok {
436		return returnFunc(ctx, repo, ancestor, descendant)
437	}
438	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, domain.ObjectID, domain.ObjectID) bool); ok {
439		r0 = returnFunc(ctx, repo, ancestor, descendant)
440	} else {
441		r0 = ret.Get(0).(bool)
442	}
443	if returnFunc, ok := ret.Get(1).(func(context.Context, domain.RepoName, domain.ObjectID, domain.ObjectID) error); ok {
444		r1 = returnFunc(ctx, repo, ancestor, descendant)
445	} else {
446		r1 = ret.Error(1)
447	}
448	return r0, r1
449}
450
451// MergeGit_IsAncestor_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsAncestor'
452type MergeGit_IsAncestor_Call struct {
453	*mock.Call
454}
455
456// IsAncestor is a helper method to define mock.On call
457//   - ctx context.Context
458//   - repo domain.RepoName
459//   - ancestor domain.ObjectID
460//   - descendant domain.ObjectID
461func (_e *MergeGit_Expecter) IsAncestor(ctx any, repo any, ancestor any, descendant any) *MergeGit_IsAncestor_Call {
462	return &MergeGit_IsAncestor_Call{Call: _e.mock.On("IsAncestor", ctx, repo, ancestor, descendant)}
463}
464
465func (_c *MergeGit_IsAncestor_Call) Run(run func(ctx context.Context, repo domain.RepoName, ancestor domain.ObjectID, descendant domain.ObjectID)) *MergeGit_IsAncestor_Call {
466	_c.Call.Run(func(args mock.Arguments) {
467		var arg0 context.Context
468		if args[0] != nil {
469			arg0 = args[0].(context.Context)
470		}
471		var arg1 domain.RepoName
472		if args[1] != nil {
473			arg1 = args[1].(domain.RepoName)
474		}
475		var arg2 domain.ObjectID
476		if args[2] != nil {
477			arg2 = args[2].(domain.ObjectID)
478		}
479		var arg3 domain.ObjectID
480		if args[3] != nil {
481			arg3 = args[3].(domain.ObjectID)
482		}
483		run(
484			arg0,
485			arg1,
486			arg2,
487			arg3,
488		)
489	})
490	return _c
491}
492
493func (_c *MergeGit_IsAncestor_Call) Return(b bool, err error) *MergeGit_IsAncestor_Call {
494	_c.Call.Return(b, err)
495	return _c
496}
497
498func (_c *MergeGit_IsAncestor_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName, ancestor domain.ObjectID, descendant domain.ObjectID) (bool, error)) *MergeGit_IsAncestor_Call {
499	_c.Call.Return(run)
500	return _c
501}
502
503// ListRange provides a mock function for the type MergeGit
504func (_mock *MergeGit) ListRange(ctx context.Context, repo domain.RepoName, exclude domain.ObjectID, head domain.ObjectID, limit int) ([]domain.Commit, bool, error) {
505	ret := _mock.Called(ctx, repo, exclude, head, limit)
506
507	if len(ret) == 0 {
508		panic("no return value specified for ListRange")
509	}
510
511	var r0 []domain.Commit
512	var r1 bool
513	var r2 error
514	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, domain.ObjectID, domain.ObjectID, int) ([]domain.Commit, bool, error)); ok {
515		return returnFunc(ctx, repo, exclude, head, limit)
516	}
517	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, domain.ObjectID, domain.ObjectID, int) []domain.Commit); ok {
518		r0 = returnFunc(ctx, repo, exclude, head, limit)
519	} else {
520		if ret.Get(0) != nil {
521			r0 = ret.Get(0).([]domain.Commit)
522		}
523	}
524	if returnFunc, ok := ret.Get(1).(func(context.Context, domain.RepoName, domain.ObjectID, domain.ObjectID, int) bool); ok {
525		r1 = returnFunc(ctx, repo, exclude, head, limit)
526	} else {
527		r1 = ret.Get(1).(bool)
528	}
529	if returnFunc, ok := ret.Get(2).(func(context.Context, domain.RepoName, domain.ObjectID, domain.ObjectID, int) error); ok {
530		r2 = returnFunc(ctx, repo, exclude, head, limit)
531	} else {
532		r2 = ret.Error(2)
533	}
534	return r0, r1, r2
535}
536
537// MergeGit_ListRange_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListRange'
538type MergeGit_ListRange_Call struct {
539	*mock.Call
540}
541
542// ListRange is a helper method to define mock.On call
543//   - ctx context.Context
544//   - repo domain.RepoName
545//   - exclude domain.ObjectID
546//   - head domain.ObjectID
547//   - limit int
548func (_e *MergeGit_Expecter) ListRange(ctx any, repo any, exclude any, head any, limit any) *MergeGit_ListRange_Call {
549	return &MergeGit_ListRange_Call{Call: _e.mock.On("ListRange", ctx, repo, exclude, head, limit)}
550}
551
552func (_c *MergeGit_ListRange_Call) Run(run func(ctx context.Context, repo domain.RepoName, exclude domain.ObjectID, head domain.ObjectID, limit int)) *MergeGit_ListRange_Call {
553	_c.Call.Run(func(args mock.Arguments) {
554		var arg0 context.Context
555		if args[0] != nil {
556			arg0 = args[0].(context.Context)
557		}
558		var arg1 domain.RepoName
559		if args[1] != nil {
560			arg1 = args[1].(domain.RepoName)
561		}
562		var arg2 domain.ObjectID
563		if args[2] != nil {
564			arg2 = args[2].(domain.ObjectID)
565		}
566		var arg3 domain.ObjectID
567		if args[3] != nil {
568			arg3 = args[3].(domain.ObjectID)
569		}
570		var arg4 int
571		if args[4] != nil {
572			arg4 = args[4].(int)
573		}
574		run(
575			arg0,
576			arg1,
577			arg2,
578			arg3,
579			arg4,
580		)
581	})
582	return _c
583}
584
585func (_c *MergeGit_ListRange_Call) Return(commits []domain.Commit, more bool, err error) *MergeGit_ListRange_Call {
586	_c.Call.Return(commits, more, err)
587	return _c
588}
589
590func (_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 {
591	_c.Call.Return(run)
592	return _c
593}
594
595// MergeBase provides a mock function for the type MergeGit
596func (_mock *MergeGit) MergeBase(ctx context.Context, repo domain.RepoName, a domain.ObjectID, b domain.ObjectID) (domain.ObjectID, error) {
597	ret := _mock.Called(ctx, repo, a, b)
598
599	if len(ret) == 0 {
600		panic("no return value specified for MergeBase")
601	}
602
603	var r0 domain.ObjectID
604	var r1 error
605	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, domain.ObjectID, domain.ObjectID) (domain.ObjectID, error)); ok {
606		return returnFunc(ctx, repo, a, b)
607	}
608	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, domain.ObjectID, domain.ObjectID) domain.ObjectID); ok {
609		r0 = returnFunc(ctx, repo, a, b)
610	} else {
611		r0 = ret.Get(0).(domain.ObjectID)
612	}
613	if returnFunc, ok := ret.Get(1).(func(context.Context, domain.RepoName, domain.ObjectID, domain.ObjectID) error); ok {
614		r1 = returnFunc(ctx, repo, a, b)
615	} else {
616		r1 = ret.Error(1)
617	}
618	return r0, r1
619}
620
621// MergeGit_MergeBase_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MergeBase'
622type MergeGit_MergeBase_Call struct {
623	*mock.Call
624}
625
626// MergeBase is a helper method to define mock.On call
627//   - ctx context.Context
628//   - repo domain.RepoName
629//   - a domain.ObjectID
630//   - b domain.ObjectID
631func (_e *MergeGit_Expecter) MergeBase(ctx any, repo any, a any, b any) *MergeGit_MergeBase_Call {
632	return &MergeGit_MergeBase_Call{Call: _e.mock.On("MergeBase", ctx, repo, a, b)}
633}
634
635func (_c *MergeGit_MergeBase_Call) Run(run func(ctx context.Context, repo domain.RepoName, a domain.ObjectID, b domain.ObjectID)) *MergeGit_MergeBase_Call {
636	_c.Call.Run(func(args mock.Arguments) {
637		var arg0 context.Context
638		if args[0] != nil {
639			arg0 = args[0].(context.Context)
640		}
641		var arg1 domain.RepoName
642		if args[1] != nil {
643			arg1 = args[1].(domain.RepoName)
644		}
645		var arg2 domain.ObjectID
646		if args[2] != nil {
647			arg2 = args[2].(domain.ObjectID)
648		}
649		var arg3 domain.ObjectID
650		if args[3] != nil {
651			arg3 = args[3].(domain.ObjectID)
652		}
653		run(
654			arg0,
655			arg1,
656			arg2,
657			arg3,
658		)
659	})
660	return _c
661}
662
663func (_c *MergeGit_MergeBase_Call) Return(objectID domain.ObjectID, err error) *MergeGit_MergeBase_Call {
664	_c.Call.Return(objectID, err)
665	return _c
666}
667
668func (_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 {
669	_c.Call.Return(run)
670	return _c
671}
672
673// UpdateBranch provides a mock function for the type MergeGit
674func (_mock *MergeGit) UpdateBranch(ctx context.Context, repo domain.RepoName, branch string, old domain.ObjectID, new domain.ObjectID) error {
675	ret := _mock.Called(ctx, repo, branch, old, new)
676
677	if len(ret) == 0 {
678		panic("no return value specified for UpdateBranch")
679	}
680
681	var r0 error
682	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, string, domain.ObjectID, domain.ObjectID) error); ok {
683		r0 = returnFunc(ctx, repo, branch, old, new)
684	} else {
685		r0 = ret.Error(0)
686	}
687	return r0
688}
689
690// MergeGit_UpdateBranch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateBranch'
691type MergeGit_UpdateBranch_Call struct {
692	*mock.Call
693}
694
695// UpdateBranch is a helper method to define mock.On call
696//   - ctx context.Context
697//   - repo domain.RepoName
698//   - branch string
699//   - old domain.ObjectID
700//   - new domain.ObjectID
701func (_e *MergeGit_Expecter) UpdateBranch(ctx any, repo any, branch any, old any, new any) *MergeGit_UpdateBranch_Call {
702	return &MergeGit_UpdateBranch_Call{Call: _e.mock.On("UpdateBranch", ctx, repo, branch, old, new)}
703}
704
705func (_c *MergeGit_UpdateBranch_Call) Run(run func(ctx context.Context, repo domain.RepoName, branch string, old domain.ObjectID, new domain.ObjectID)) *MergeGit_UpdateBranch_Call {
706	_c.Call.Run(func(args mock.Arguments) {
707		var arg0 context.Context
708		if args[0] != nil {
709			arg0 = args[0].(context.Context)
710		}
711		var arg1 domain.RepoName
712		if args[1] != nil {
713			arg1 = args[1].(domain.RepoName)
714		}
715		var arg2 string
716		if args[2] != nil {
717			arg2 = args[2].(string)
718		}
719		var arg3 domain.ObjectID
720		if args[3] != nil {
721			arg3 = args[3].(domain.ObjectID)
722		}
723		var arg4 domain.ObjectID
724		if args[4] != nil {
725			arg4 = args[4].(domain.ObjectID)
726		}
727		run(
728			arg0,
729			arg1,
730			arg2,
731			arg3,
732			arg4,
733		)
734	})
735	return _c
736}
737
738func (_c *MergeGit_UpdateBranch_Call) Return(err error) *MergeGit_UpdateBranch_Call {
739	_c.Call.Return(err)
740	return _c
741}
742
743func (_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 {
744	_c.Call.Return(run)
745	return _c
746}
747
748// WriteCommit provides a mock function for the type MergeGit
749func (_mock *MergeGit) WriteCommit(ctx context.Context, repo domain.RepoName, object []byte) (domain.ObjectID, error) {
750	ret := _mock.Called(ctx, repo, object)
751
752	if len(ret) == 0 {
753		panic("no return value specified for WriteCommit")
754	}
755
756	var r0 domain.ObjectID
757	var r1 error
758	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, []byte) (domain.ObjectID, error)); ok {
759		return returnFunc(ctx, repo, object)
760	}
761	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.RepoName, []byte) domain.ObjectID); ok {
762		r0 = returnFunc(ctx, repo, object)
763	} else {
764		r0 = ret.Get(0).(domain.ObjectID)
765	}
766	if returnFunc, ok := ret.Get(1).(func(context.Context, domain.RepoName, []byte) error); ok {
767		r1 = returnFunc(ctx, repo, object)
768	} else {
769		r1 = ret.Error(1)
770	}
771	return r0, r1
772}
773
774// MergeGit_WriteCommit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WriteCommit'
775type MergeGit_WriteCommit_Call struct {
776	*mock.Call
777}
778
779// WriteCommit is a helper method to define mock.On call
780//   - ctx context.Context
781//   - repo domain.RepoName
782//   - object []byte
783func (_e *MergeGit_Expecter) WriteCommit(ctx any, repo any, object any) *MergeGit_WriteCommit_Call {
784	return &MergeGit_WriteCommit_Call{Call: _e.mock.On("WriteCommit", ctx, repo, object)}
785}
786
787func (_c *MergeGit_WriteCommit_Call) Run(run func(ctx context.Context, repo domain.RepoName, object []byte)) *MergeGit_WriteCommit_Call {
788	_c.Call.Run(func(args mock.Arguments) {
789		var arg0 context.Context
790		if args[0] != nil {
791			arg0 = args[0].(context.Context)
792		}
793		var arg1 domain.RepoName
794		if args[1] != nil {
795			arg1 = args[1].(domain.RepoName)
796		}
797		var arg2 []byte
798		if args[2] != nil {
799			arg2 = args[2].([]byte)
800		}
801		run(
802			arg0,
803			arg1,
804			arg2,
805		)
806	})
807	return _c
808}
809
810func (_c *MergeGit_WriteCommit_Call) Return(objectID domain.ObjectID, err error) *MergeGit_WriteCommit_Call {
811	_c.Call.Return(objectID, err)
812	return _c
813}
814
815func (_c *MergeGit_WriteCommit_Call) RunAndReturn(run func(ctx context.Context, repo domain.RepoName, object []byte) (domain.ObjectID, error)) *MergeGit_WriteCommit_Call {
816	_c.Call.Return(run)
817	return _c
818}

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 2

Tags 45

↑↓ moveenter openesc close