54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
# File 'lib/meta_commit/cli.rb', line 54
def index
repository_path = options[:directory]
repository = MetaCommit::Git::Repo.new(repository_path)
container = boot_container_with_config(File.join(repository_path, MetaCommit::ConfigurationStore::META_COMMIT_CONFIG_FILENAME))
examiner = MetaCommit::Index::Commands::DiffExaminer.new(
container.resolve(:parse_command),
container.resolve(:contextual_ast_node_factory),
container.resolve(:diff_factory)
)
meta = examiner.meta(repository)
adapter = MetaCommit::Index::Adapters::GitNotes.new(repository.path)
change_saver = MetaCommit::Services::ChangeSaver.new(repository, adapter)
change_saver.store_meta(meta)
say('repository successfully indexed')
end
|