Skip to content

Commit

Permalink
move curr_branch down
Browse files Browse the repository at this point in the history
  • Loading branch information
Spitfire1900 committed Mar 28, 2024
1 parent c565788 commit 792d7d3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions xontrib/pygitstatus/prompts.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,6 @@ def behind(fld: PromptField, ctx: PromptFields):
fld.value = str(_behind) if _behind else ''


def curr_branch() -> Optional[str]:
with contextlib.suppress(GitError):
repo = Repo('.')
return repo.head.shorthand


@PromptField.wrap(prefix='{CYAN}', info='branch')
def branch(fld: PromptField, ctx: PromptFields):
fld.value = ''
Expand Down Expand Up @@ -96,6 +90,12 @@ def clean(fld: PromptField, ctx: PromptFields):
fld.value = symbol


def curr_branch() -> Optional[str]:
with contextlib.suppress(GitError):
repo = Repo('.')
return repo.head.shorthand


@PromptField.wrap(prefix="{RED}-", suffix="{RESET}", info="deleted")
def deleted(fld: PromptField, ctx: PromptFields):
fld.value = ''
Expand Down

0 comments on commit 792d7d3

Please sign in to comment.