Skip to content

Bug: branch name shows .invalid with git reftable #1472

@none23

Description

@none23

On git repos with refstorage set to reftable, branch name displays as .invalid.

It is because .git/HEAD has ref: refs/heads/.invalid and cannot be used as a source for branch names

Self Checks

  • I'm using the latest lualine.
  • I didn't find the issue in existing issues or PRs.

How to reproduce the problem

  1. Create a git repo with reftable enabled:
[core]
	repositoryformatversion = 1
[extensions]
	refstorage = reftable
  1. Open neovim

Expected behaviour

Actual branch name is displayed

Actual behaviour

Branch name is .invalid

Image

Minimal config to reproduce the issue

Additional information

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions