git/githistory: teach refsToMigrate() to find references

This commit is contained in:
Taylor Blau 2017-06-19 15:53:47 -04:00
parent 7acb18117b
commit 47afc58817

@ -366,6 +366,15 @@ func (r *Rewriter) commitsToMigrate(opt *RewriteOptions) ([][]byte, error) {
return commits, nil
}
// refsToMigrate returns a list of references to migrate, or an error if loading
// those references failed.
func (r *Rewriter) refsToMigrate() ([]*git.Ref, error) {
if root, ok := r.db.Root(); ok {
return git.AllRefsIn(root)
}
return git.AllRefs()
}
// scannerOpts returns a *git.ScanRefsOptions instance to be given to the
// *git.RevListScanner.
//