Skip to content

Does not work with --ref-format=reftable #455

Open

Description

@simnalamburt

Activity

  1. added a commit that references this issue on Mar 24, 2025
  2. simnalamburt commented on Mar 24, 2025

    @simnalamburt
    Author
  3. Syphdias commented on Sep 7, 2025

    @Syphdias

    git 2.51 makes reftable the default backend https://lore.kernel.org/git/[email protected]/
    libgit2/libgit2#7117 seems to be work in progress.

    I did not find a way to change the default via global config to work around this

  4. Syphdias commented on Sep 7, 2025

    @Syphdias

    You can however migrate on a per-repository basis:

    git fetch
    git refs migrate --ref-format=files

    These are the telltale signs of reftables backend:

    ❯ cat .git/HEAD
    ref: refs/heads/.invalid
    ❯ cat .git/refs/heads
    this repository uses the reftable format
  5. simnalamburt commented on Sep 9, 2025

    @simnalamburt
    Author

    It looks like libgit2 reftable support is almost ready. There is already a fully working PR libgit2/libgit2#7117, just waiting for review.

  6. Syphdias commented on Sep 9, 2025

    @Syphdias

    I apologize, reftable is only the default if feature.experimental is true.

    setup: use "reftable" format when experimental features are enabled

    Default for everybody will be in 3.0

    • The reftable ref backend has matured enough; Git 3.0 will make it
      the default format in a newly created repositories by default.
  7. romkatv commented on Sep 9, 2025

    @romkatv
    Owner

    When it comes to gitstatus or powerlevel10k, my most important goal is to have a viable alternative to gitstatusd. git's performance has come a long way since 2019; a native binary running in the background is no longer justifiable. There is nothing in the way of the progress but my laziness, and at the moment I'm optimistic about overcoming it.

  8. simnalamburt commented on Sep 15, 2025

    @simnalamburt
    Author

    It’s fine. If we wait a bit, a new version of libgit2 with reftable support will be released, and then all we need to do is update libgit2. There’s nothing for us to do (except maybe help review libgit2?)

  9. simnalamburt commented on Jun 8, 2026

    @simnalamburt
    Author

    Today, I created a fork of gitstatus that supports reftable. On macOS, it can be installed with the commands below, and I confirmed that it interoperates correctly with powerlevel10k.

    brew install simnalamburt/x/gitstatus
    export GITSTATUS_DAEMON=/opt/homebrew/bin/gitstatusd

    This was possible because the main branch of libgit2 now supports reftable: libgit2/libgit2#7117. (The latest libgit2 releases, 1.9.3 and 1.9.4, do not include reftable support.) What I did was update gitstatus’s libgit2 dependency to the latest revision of libgit2.

    As stated in gitstatus’s README, the existing gitstatus uses romkatv/libgit2, a fork of libgit2. Because of this, I had to remove usages of fork-only APIs that exist only in romkatv/libgit2. This may cause some performance loss. For example, replacing git_index_get_byindex_no_sort with git_index_get_byindex introduces unnecessary sorting overhead. However, when I tested it on large Git repositories such as Kubernetes and Linux, the difference was not particularly noticeable, so I proceeded for now. If I have time later, it would probably be good to rebase the romkatv/libgit2 patches on top of the latest libgit2.

    You can see the patches I applied to gitstatus here: simnalamburt/gitstatus@075baf6...2f6cb0e

    I also packaged it with Homebrew for easy installation. You can see the packaging process here:

    @romkatv One thing I felt while doing this work is that a native binary running in the background still seems justifiable. It was much faster to keep the patched version of gitstatusd running than to execute the git binary on every prompt. So I intend to keep using gitstatus going forward, and I am willing to handle this kind of maintenance myself. However, since the current gitstatus project appears to be on life support, I am concerned that reviewing these kinds of patches might be a significant burden for you. What would be the best way to proceed from here?

  10. nickie commented on Aug 20, 2026

    @nickie

    The missing support for reftables makes Powerlevel10k less elegant, as in repositories with many submodules there's no correspondence between git status and the shell prompt. My working directory looks always dirty and not using reftable is not an acceptable solution. It would be nice to resolve this, one way or the other.

  11. simnalamburt commented on Aug 21, 2026

    @simnalamburt
    Author

    @nickie Please try my patched version of gitstatusd. It works well (it also supports SHA-256 git repo!)

    @romkatv I'm definitely willing to help you maintain gitstatusd. Currently there's no alternative solutions in this universe. Thanks for your awesome software and please feel free to talk to me anytime! 👍

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions