You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wonder if we should optimize this further, i.e. use generator and return False if there is any changes rather than collecting everything. :)
Something like:
fromitertoolsimportchain, zip_longestwithopen_repo_closing(repo) asr:
# 1. Get status of stagedtracked_changes=get_tree_changes(r)
# 2. Get status of unstagedindex=r.open_index()
normalizer=r.get_blob_normalizer()
filter_callback=normalizer.checkin_normalizeunstaged_changes=get_unstaged_changes(index, r.path, filter_callback)
untracked_paths=get_untracked_paths(
r.path,
r.path,
index,
exclude_ignored=notignored,
untracked_files=untracked_files,
)
returnany(chain.from_iterable(zip_longest(untracked_paths, unstaged_changes)))
The only doubt that I have is that it won't reuse IgnoreManager, which I think already happens for status.
No strong opinion though, we could also propose this in dulwich.
I wonder if we should optimize this further, i.e. use generator and return False if there is any changes rather than collecting everything. :)
Something like:
The only doubt that I have is that it won't reuse IgnoreManager, which I think already happens for
status
.No strong opinion though, we could also propose this in dulwich.
Originally posted by @skshetry in #74 (comment)
The text was updated successfully, but these errors were encountered: