MCPcopy
hub / github.com/pre-commit/pre-commit / add_config_to_repo

Function add_config_to_repo

testing/fixtures.py:131–135  ·  view source on GitHub ↗
(git_path, config, config_file=C.CONFIG_FILE)

Source from the content-addressed store, hash-verified

129
130
131def add_config_to_repo(git_path, config, config_file=C.CONFIG_FILE):
132 write_config(git_path, config, config_file=config_file)
133 cmd_output('git', 'add', config_file, cwd=git_path)
134 git_commit(msg=add_config_to_repo.__name__, cwd=git_path)
135 return git_path
136
137
138def remove_config_from_repo(git_path, config_file=C.CONFIG_FILE):

Callers 15

test_during_commit_allFunction · 0.90
test_no_textconvFunction · 0.90
test_stagesFunction · 0.90
test_post_checkout_hookFunction · 0.90
test_local_hook_passesFunction · 0.90
test_local_hook_failsFunction · 0.90
test_meta_hook_passesFunction · 0.90

Calls 3

cmd_outputFunction · 0.90
git_commitFunction · 0.90
write_configFunction · 0.85

Tested by 15

test_during_commit_allFunction · 0.72
test_no_textconvFunction · 0.72
test_stagesFunction · 0.72
test_post_checkout_hookFunction · 0.72
test_local_hook_passesFunction · 0.72
test_local_hook_failsFunction · 0.72
test_meta_hook_passesFunction · 0.72