Skip to content

Commit

Permalink
Merge pull request #193 from mineralsfree/ENT-11811
Browse files Browse the repository at this point in the history
ENT-11811: cfbs recognizes and commits module input changes
  • Loading branch information
olehermanse authored May 29, 2024
2 parents c11a09d + d4324c9 commit 3d88acc
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 3d88acc

Please sign in to comment.