MCPcopy Index your code
hub / github.com/treeverse/dvc / prompt_to_commit

Function prompt_to_commit

dvc/repo/commit.py:36–42  ·  view source on GitHub ↗
(stage, changes, force=False)

Source from the content-addressed store, hash-verified

34
35
36def prompt_to_commit(stage, changes, force=False):
37 from dvc.stage.exceptions import StageCommitError
38
39 if not (force or prompt.confirm(_prepare_message(stage, changes))):
40 raise StageCommitError(
41 f"unable to commit changed {stage}. Use `-f|--force` to force."
42 )
43
44
45@locked

Callers 1

commitFunction · 0.85

Calls 3

StageCommitErrorClass · 0.90
confirmMethod · 0.80
_prepare_messageFunction · 0.70

Tested by

no test coverage detected