From 71d234181e3e8a0c7c3a5ee9e23875da461728f4 Mon Sep 17 00:00:00 2001 From: Anunaya Srivastava Date: Fri, 13 Sep 2024 20:28:23 +0530 Subject: [PATCH] cli: add allow-missing flag to commit command Fixes #10524 --- dvc/commands/commit.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dvc/commands/commit.py b/dvc/commands/commit.py index a97019a3f9..76926245bb 100644 --- a/dvc/commands/commit.py +++ b/dvc/commands/commit.py @@ -20,6 +20,7 @@ def run(self): with_deps=self.args.with_deps, recursive=self.args.recursive, force=self.args.force, + allow_missing=self.args.allow_missing, relink=self.args.relink, ) except DvcException: @@ -51,6 +52,12 @@ def add_parser(subparsers, parent_parser): "outputs did not change." ), ) + commit_parser.add_argument( + "--allow-missing", + action="store_true", + default=False, + help="Ignore errors if some of the files or directories are missing.", + ) commit_parser.add_argument( "-d", "--with-deps",