From 3583c25c676abd5a230107d6846d499e510e5a19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Wed, 24 Jul 2024 20:21:10 +0200 Subject: [PATCH] fix error message when removing secrets --- pkgs/clan-cli/clan_cli/git.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/clan-cli/clan_cli/git.py b/pkgs/clan-cli/clan_cli/git.py index b2abbcf19..72da807ab 100644 --- a/pkgs/clan-cli/clan_cli/git.py +++ b/pkgs/clan-cli/clan_cli/git.py @@ -62,7 +62,7 @@ def _commit_file_to_git( for file_path in file_paths: cmd = run_cmd( ["git"], - ["git", "-C", str(repo_dir), "add", str(file_path)], + ["git", "-C", str(repo_dir), "add", "--", str(file_path)], ) # add the file to the git index @@ -75,7 +75,7 @@ def _commit_file_to_git( # check if there is a diff cmd = run_cmd( ["git"], - ["git", "-C", str(repo_dir), "diff", "--cached", "--exit-code"] + ["git", "-C", str(repo_dir), "diff", "--cached", "--exit-code", "--"] + [str(file_path) for file_path in file_paths], ) result = run(cmd, check=False, cwd=repo_dir)