Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions remote.go
Original file line number Diff line number Diff line change
Expand Up @@ -859,6 +859,15 @@ func getHavesFromRef(
toVisit := maxHavesToVisitPerRef
return walker.ForEach(func(c *object.Commit) error {
haves[c.Hash] = true

if s, _ := s.Shallow(); len(s) > 0 {
for _, sh := range s {
if sh == c.Hash {
return storer.ErrStop
}
}
}

toVisit--
// If toVisit starts out at 0 (indicating there is no
// max), then it will be negative here and we won't stop
Expand Down