Merge pull request 'fix error message when removing secrets' (#1806) from Mic92-main into main
This commit is contained in:
@@ -62,7 +62,7 @@ def _commit_file_to_git(
|
|||||||
for file_path in file_paths:
|
for file_path in file_paths:
|
||||||
cmd = run_cmd(
|
cmd = run_cmd(
|
||||||
["git"],
|
["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
|
# add the file to the git index
|
||||||
|
|
||||||
@@ -75,7 +75,7 @@ def _commit_file_to_git(
|
|||||||
# check if there is a diff
|
# check if there is a diff
|
||||||
cmd = run_cmd(
|
cmd = run_cmd(
|
||||||
["git"],
|
["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],
|
+ [str(file_path) for file_path in file_paths],
|
||||||
)
|
)
|
||||||
result = run(cmd, check=False, cwd=repo_dir)
|
result = run(cmd, check=False, cwd=repo_dir)
|
||||||
|
|||||||
Reference in New Issue
Block a user