Skip to content

Commit

Permalink
rename internal variable to staged_count
Browse files Browse the repository at this point in the history
  • Loading branch information
Spitfire1900 committed Jan 2, 2025
1 parent 0548cfd commit 7c5eb8b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xontrib/pygitstatus/prompts.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def staged(fld: PromptField, ctx: PromptFields):
fld.value = ''
with contextlib.suppress(GitError):
repo = Repo('.')
untracked_count = len([
staged_count = len([
file_status for file_status in repo.status().values() if any([
FileStatus.INDEX_MODIFIED & file_status,
FileStatus.INDEX_NEW & file_status,
Expand All @@ -236,8 +236,8 @@ def staged(fld: PromptField, ctx: PromptFields):
# FileStatus.CONFLICTED & file_status,
])
])
if untracked_count > 0:
fld.value = str(untracked_count)
if staged_count > 0:
fld.value = str(staged_count)


@PromptField.wrap(prefix="⚑", name='pygitstatus.stash_count')
Expand Down

0 comments on commit 7c5eb8b

Please sign in to comment.