Skip to content

[Git 2.45] Reftable storage backend is not supported #6086

Closed

Description

@jaudiger

pkg_version:1.19.0
branch:
commit_hash:
build_time:1980-01-01 00:00:00 +00:00
build_env:rustc 1.78.0 (9b00956e5 2024-04-29) (built from a source tarball),

Current Behavior

Git 2.45 is needed to reproduce this bug, since it makes use of the new reference storage backend "reftable".

Just clone a git repository with reftable used:

git clone --ref-format=reftable [email protected]:starship/starship.git

Then go to the newly cloned directory. Git information are not displayed properly:

 …/starship [🌱 HEAD](+0/-0)

Expected Behavior

The bit branch and git commit should be shown:

 …/starship [🌱 master](27cc4bc)(+0/-0)

Environment

  • Starship version: 1.19.0
  • zsh version: zsh 5.9 (aarch64-apple-darwin23.5.0)
  • Operating system: Mac OS 14.5.0
  • Terminal emulator: Apple_Terminal 453
  • Git Commit Hash:
  • Branch/Tag:
  • Rust Version: rustc 1.78.0 (9b00956e5 2024-04-29) (built from a source tarball)
  • Rust channel: release
  • Build Time: 1980-01-01 00:00:00 +00:00

Starship Configuration

[git_branch]
format = "\\[[$symbol$branch]($style)\\]"
style = "bold yellow"
symbol = "🌱 "

[git_commit]
commit_hash_length = 7
format = "[\\($hash\\)]($style)( [\\($tag\\)]($style))"
only_detached = false
style = "bold white"
tag_disabled = false
tag_symbol = "🔖"

[git_metrics]
added_style = "bold dimmed green"
deleted_style = "bold dimmed red"
disabled = false
format = "\\([+$added]($added_style)/[-$deleted]($deleted_style)\\)"
only_nonzero_diffs = false

[git_state]
format = "[\\($state( $progress_current of $progress_total)\\)]($style) "

[git_status]
ahead = "🏎💨×$count"
behind = "🐢×$count"
conflicted = "⚔"
deleted = "🗑×$count"
diverged = "🏎💨×$ahead_count 🐢×$behind_count"
format = "([\\[$all_status$ahead_behind\\]]($style))"
modified = "📝×$count"
renamed = "📛×$count"
staged = "🗃×$count"
stashed = "📦"
style = "bold white"
untracked = "🛤"

Activity

  1. FirelightFlagboy commented on Jul 6, 2025

    @FirelightFlagboy

    After looking how the information is retreive on starship side, it seems that the dependency gix does not support reftable.

    My reasoning for that is the branch name is retrieve from:

    starship/src/context.rs

    Lines 832 to 834 in 76f125b

    fn get_current_branch(repository: &Repository) -> Option<gix::refs::FullName> {
    repository.head_name().ok()?
    }

    (Repository is imported from gix:

    starship/src/context.rs

    Lines 10 to 11 in 76f125b

    use gix::{
    Repository, ThreadSafeRepository,
    )

    which is use to set the actual branch name in get_repo:

    let branch = get_current_branch(&repository);

    Which is used in the module git_branch:

    let repo = context.get_repo().ok()?;

    It seems that they already have a tracking issue on gix side: GitoxideLabs/gitoxide#109

  2. Soleone commented on Nov 3, 2025

    @Soleone

    This just became very relevant at our company for many developers as we're switching to reftables for a monorepo.

  3. jaudiger commented on Nov 3, 2025

    @jaudiger
    ContributorAuthor

    Starting with Git 3.0, this backend should become the default when cloning new repositories as mentioned here:

     * The reftable ref backend has matured enough; Git 3.0 will make it
       the default format in a newly created repositories by default.
    
  4. denysovkos commented on Nov 19, 2025

    @denysovkos

    Hi there 👋

    I’m running into the same issue outlined here: [Git 2.51.2] Reftable storage backend is not supported #6086

    When I navigate to a repo it always shows HEAD as the branch instead of the actual branch name, which is quite uncomfortable when I want to see the current branch.

    Could you share any updates on this? Thanks!

  5. akkadaya commented on Nov 28, 2025

    @akkadaya

    How can I get a notification when this is implemented? I will switch to oh-my-posh for now until it's fixed, it seems it's working on OMP

  6. Byron commented on Nov 28, 2025

    @Byron
    Contributor

    Actually you can turn that off and resort to the Git executable, the most compatible option:

    [git_status]
    # Force using the system `git` executable instead of the gitoxide backend
    use_git_executable = true
    
  7. FirelightFlagboy commented on Nov 28, 2025

    @FirelightFlagboy

    Even with use_git_executable = true, the branch is not the correct one:

    Image
    Starship git_status config
    [git_status]
    conflicted = "​"
    deleted = "​"
    format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style) "
    modified = "​"
    renamed = "​"
    staged = "​"
    stashed = ""
    style = "cyan"
    untracked = "​"
    use_git_executable = true
  8. akkadaya commented on Nov 28, 2025

    @akkadaya

    yeah, I was going to say it's not working. It should be added/used in git_branch not git_status

  9. FirelightFlagboy commented on Nov 28, 2025

    @FirelightFlagboy

    yeah, I was going to say it's not working. It should be used in git_branch not git_status

    [WARN] - (starship::config): Error in 'GitBranch' at 'use_git_executable': Unknown key 
    
    Starship git_branch config
    [git_branch]
    format = "[$branch]($style)"
    style = "bright-black"
    use_git_executable = true
  10. akkadaya commented on Nov 28, 2025

    @akkadaya

    Sorry, I edited my comment

    It should be added/used in git_branch not git_status

    that option should be implemented for git_branch, maybe it's a temporary solution for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    🌊 upstreamDepends on an upstream solve beyond starship🐛 bugSomething isn't working as expected.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions