Skip to content

Commit

Permalink
Update run.py
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxHalford committed Nov 29, 2023
1 parent a9ea7a9 commit 570efc3
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lea/app/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,15 @@ def _expand_select(select):
ancestors = m.group("ancestors") == "+"
descendants = m.group("descendants") == "+"

repo = git.Repo(".")
repo = git.Repo(".") # TODO: is using "." always correct? Probably not.
# Changes that have been committed
staged_diffs = repo.index.diff(
repo.remotes.origin.refs.main.commit
) # changes that have been committed
unstage_diffs = repo.head.commit.diff(None) # changes that have not been committed
repo.refs.main.commit
# repo.remotes.origin.refs.main.commit
)
# Changes that have not been committed
unstage_diffs = repo.head.commit.diff(None)

for diff in staged_diffs + unstage_diffs:
# We only care about changes to views
# TODO: here we only check the file's location. We don't check whether the file
Expand Down

0 comments on commit 570efc3

Please sign in to comment.