Skip to content

Commit

Permalink
Don't ignore hidden files
Browse files Browse the repository at this point in the history
* When checking whether an external repository has changed
* When computing fingerprint of a given directory
  • Loading branch information
Nikokrock committed Mar 22, 2024
1 parent 2cb9646 commit cf2872a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/e3/anod/checkout.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def update_external(
the list of files to ignore.
"""
if os.path.isdir(self.working_dir):
old_commit = get_filetree_state(self.working_dir)
old_commit = get_filetree_state(self.working_dir, ignore_hidden=False)
else:
old_commit = ""
ignore_list: list[str] = []
Expand Down Expand Up @@ -187,7 +187,7 @@ def update_external(
ignore=list(VCS_IGNORE_LIST) + ignore_list,
)

new_commit = get_filetree_state(self.working_dir)
new_commit = get_filetree_state(self.working_dir, ignore_hidden=False)
if new_commit == old_commit:
return ReturnValue.unchanged, old_commit, new_commit
else:
Expand Down
4 changes: 3 additions & 1 deletion src/e3/fingerprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ def add_dir(self, path: str) -> None:
:param path: a path to a directory
"""
if os.path.isdir(path):
self.elements[os.path.abspath(path)] = get_filetree_state(path)
self.elements[os.path.abspath(path)] = get_filetree_state(
path, ignore_hidden=False
)
else:
self.elements[os.path.abspath(path)] = ""

Expand Down

0 comments on commit cf2872a

Please sign in to comment.