Skip deleted files while check files with secrets
This commit is contained in:
@@ -15,10 +15,10 @@ ANSIBLE_VAULT_MARKER = "$ANSIBLE_VAULT"
|
||||
|
||||
|
||||
def get_staged_files():
|
||||
"""Get list of staged files for commit."""
|
||||
"""Get list of staged files for commit, excluding deleted files."""
|
||||
try:
|
||||
result = subprocess.run(
|
||||
["git", "diff", "--cached", "--name-only"],
|
||||
["git", "diff", "--cached", "--name-only", "--diff-filter=AM"],
|
||||
capture_output=True,
|
||||
text=True,
|
||||
check=True,
|
||||
|
Reference in New Issue
Block a user