MCPcopy
hub / github.com/git-lfs/git-lfs / getObjectDatabase

Function getObjectDatabase

commands/command_migrate.go:86–93  ·  view source on GitHub ↗

getObjectDatabase creates a *git.ObjectDatabase from the filesystem pointed at the .git directory of the currently checked-out repository.

()

Source from the content-addressed store, hash-verified

84// getObjectDatabase creates a *git.ObjectDatabase from the filesystem pointed
85// at the .git directory of the currently checked-out repository.
86func 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

Callers 3

migrateImportCommandFunction · 0.85
migrateExportCommandFunction · 0.85
migrateInfoCommandFunction · 0.85

Calls 7

GitCommonDirFunction · 0.92
WrapFunction · 0.92
ObjectDatabaseFunction · 0.92
GetMethod · 0.65
OSEnvMethod · 0.65
GitEnvMethod · 0.65
TempDirMethod · 0.45

Tested by

no test coverage detected