getObjectDatabase creates a *git.ObjectDatabase from the filesystem pointed at the .git directory of the currently checked-out repository.
()
| 84 | // getObjectDatabase creates a *git.ObjectDatabase from the filesystem pointed |
| 85 | // at the .git directory of the currently checked-out repository. |
| 86 | func getObjectDatabase() (*gitobj.ObjectDatabase, error) { |
| 87 | dir, err := git.GitCommonDir() |
| 88 | if err != nil { |
| 89 | return nil, errors.Wrap(err, tr.Tr.Get("cannot open root")) |
| 90 | } |
| 91 | |
| 92 | return git.ObjectDatabase(cfg.OSEnv(), cfg.GitEnv(), dir, cfg.TempDir()) |
| 93 | } |
| 94 | |
| 95 | // rewriteOptions returns *githistory.RewriteOptions able to be passed to a |
| 96 | // *githistory.Rewriter that reflect the current arguments and flags passed to |
no test coverage detected