Skip to content

Commit

Permalink
fix: cfbs recognizes and commits module input changes
Browse files Browse the repository at this point in the history
Ticket: ENT-11811
Changelog: None
Signed-off-by: Mikita Pilinka <[email protected]>
  • Loading branch information
mineralsfree committed May 29, 2024
1 parent c8fc131 commit b997e80
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cfbs/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"""

import os
import itertools
import tempfile
from subprocess import check_call, check_output, run, PIPE, DEVNULL, CalledProcessError

Expand Down Expand Up @@ -189,7 +190,12 @@ def git_check_tracked_changes(scope=["all"]):
else:
lines = result.stdout.decode("utf-8").split("\n")
changes = [line.strip().split(" ")[1] for line in lines if line]
should_commit = any(i in changes for i in scope)
should_commit = any(
map(
lambda x: os.path.samefile(*x),
list(itertools.product(changes, scope)),
)
)
if not should_commit:
print("No changes to commit")
return should_commit
Expand Down

0 comments on commit b997e80

Please sign in to comment.