git/githistory: teach refsToMigrate() to find references
This commit is contained in:
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.
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user