diff --git a/src/pkgdev/scripts/pkgdev_commit.py b/src/pkgdev/scripts/pkgdev_commit.py index c85c7b1..98cbb78 100644 --- a/src/pkgdev/scripts/pkgdev_commit.py +++ b/src/pkgdev/scripts/pkgdev_commit.py @@ -48,6 +48,9 @@ def parse_known_args(self, args=None, namespace=None): if namespace.edit: args.append("--edit") namespace.commit_args = args + namespace.git_args_paths = list( + filter(os.path.exists, (s for s in args if not s.startswith("-"))) + ) return namespace, [] @@ -575,6 +578,7 @@ def _generate_mapping(self): "--cached", "-z", "HEAD", + *self._options.git_args_paths, stdout=subprocess.PIPE, )