lfs/gitscanner.go: remove unused scan method

In commit d0e950d650d19e04fbe031d01b5fa51b95195116 of PR #3978 the
ScanMultiRangeToRemote() method of the GitScanner structure was added,
and the sole caller of the existing ScanRangeToRemote() method was
revised to call the new scan method instead.

As no additional callers of the existing method have been introduced
since then, we can simplify our code by removing the unused method now.
This commit is contained in:
Chris Darroch 2023-06-04 22:25:03 -07:00
parent 4f18bc4678
commit 1d64521df7

@ -62,7 +62,7 @@ func (s *GitScanner) Close() {
}
// RemoteForPush sets up this *GitScanner to scan for objects to push to the
// given remote. Needed for ScanRangeToRemote().
// given remote. Needed for ScanMultiRangeToRemote().
func (s *GitScanner) RemoteForPush(r string) error {
s.mu.Lock()
defer s.mu.Unlock()
@ -76,25 +76,6 @@ func (s *GitScanner) RemoteForPush(r string) error {
return nil
}
// ScanRangeToRemote scans through all unique objects reachable from the
// "include" ref but not reachable from the "exclude" ref and which the
// given remote does not have. See RemoteForPush().
func (s *GitScanner) ScanRangeToRemote(include, exclude string, cb GitScannerFoundPointer) error {
callback, err := firstGitScannerCallback(cb, s.FoundPointer)
if err != nil {
return err
}
s.mu.Lock()
if len(s.remote) == 0 {
s.mu.Unlock()
return errors.New(tr.Tr.Get("unable to scan starting at %q: no remote set", include))
}
s.mu.Unlock()
return scanRefsToChanSingleIncludeExclude(s, callback, include, exclude, s.cfg.GitEnv(), s.cfg.OSEnv(), s.opts(ScanRangeToRemoteMode))
}
// ScanMultiRangeToRemote scans through all unique objects reachable from the
// "include" ref but not reachable from any "exclude" refs and which the
// given remote does not have. See RemoteForPush().