From 7c5eb8b3b4617f5d76d399d4bf8a79b7f9991718 Mon Sep 17 00:00:00 2001 From: Kyle Gottfried <6462596+Spitfire1900@users.noreply.github.com> Date: Wed, 1 Jan 2025 23:20:25 -0500 Subject: [PATCH] rename internal variable to staged_count --- xontrib/pygitstatus/prompts.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xontrib/pygitstatus/prompts.py b/xontrib/pygitstatus/prompts.py index 1b508fd..8d06061 100644 --- a/xontrib/pygitstatus/prompts.py +++ b/xontrib/pygitstatus/prompts.py @@ -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, @@ -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')