File tree Expand file tree Collapse file tree 2 files changed +14
-9
lines changed Expand file tree Collapse file tree 2 files changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -38,11 +38,11 @@ func ScanRepositoryUsingGraph(
3838
3939 errChan <- func () error {
4040 for _ , refRoot := range refRoots {
41- if ! refRoot .Walk {
41+ if ! refRoot .Walk () {
4242 continue
4343 }
4444
45- if err := objIter .AddRoot (refRoot .OID ); err != nil {
45+ if err := objIter .AddRoot (refRoot .OID () ); err != nil {
4646 return err
4747 }
4848 }
@@ -258,7 +258,7 @@ func ScanRepositoryUsingGraph(
258258 progressMeter .Start ("Processing references: %d" )
259259 for _ , refRoot := range refRoots {
260260 progressMeter .Inc ()
261- graph .RegisterReference (refRoot .Reference , refRoot .Walk , refRoot .Groups )
261+ graph .RegisterReference (refRoot .Reference () , refRoot .Walk () , refRoot .Groups () )
262262 }
263263 progressMeter .Done ()
264264
Original file line number Diff line number Diff line change @@ -45,11 +45,16 @@ type RefGrouper interface {
4545}
4646
4747type RefRoot struct {
48- git.Reference
49- Walk bool
50- Groups []RefGroupSymbol
48+ ref git.Reference
49+ walk bool
50+ groups []RefGroupSymbol
5151}
5252
53+ func (rr RefRoot ) OID () git.OID { return rr .ref .OID }
54+ func (rr RefRoot ) Reference () git.Reference { return rr .ref }
55+ func (rr RefRoot ) Walk () bool { return rr .walk }
56+ func (rr RefRoot ) Groups () []RefGroupSymbol { return rr .groups }
57+
5358func CollectReferences (
5459 ctx context.Context , repo * git.Repository , rg RefGrouper ,
5560) ([]RefRoot , error ) {
@@ -73,9 +78,9 @@ func CollectReferences(
7378 refsSeen = append (
7479 refsSeen ,
7580 RefRoot {
76- Reference : ref ,
77- Walk : walk ,
78- Groups : groups ,
81+ ref : ref ,
82+ walk : walk ,
83+ groups : groups ,
7984 },
8085 )
8186 }
You can’t perform that action at this time.
0 commit comments