-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support SHA-256 repos #411
Comments
Any plan to support this? Forgejo released v7.0 to add SHA256 hash support and I tried to setup repos using such feature which eventually led me to the issue. In the past sha-256 support in git is considered experimental and not recommended by many due to possible future incompatible update but that does not seem to be the case anymore. It's at least not too early for gitstatus to support this now. Quoted from git-init documentation in git 2.44.0: Note --object-format= Specify the given object format (hash algorithm) for the repository. The valid values are sha1 and (if enabled) sha256. sha1 is the default. Note: At present, there is no interoperability between SHA-256 repositories and SHA-1 repositories. Historically, we warned that SHA-256 repositories may later need backward incompatible changes when we introduce such interoperability features. Today, we only expect compatible changes. Furthermore, if such changes prove to be necessary, it can be expected that SHA-256 repositories created with today’s Git will be usable by future versions of Git without data loss. |
It's getting unlikely that I'll be working on this. If I get a decent chunk of free time, I'd like to remove the dependency on gitstatusd from powerlevel10k and mothball gitstatus after that. |
Sorry to hear that but still thank you for the hard work! Git 2.45 released with experimental SHA1/SHA256 interoperability. You can read a brief introduction on Highlights from Git 2.45. So instead of supporting SHA-256 repos, is it possible to add support for repos with SHA1/SHA256 interoperability by parsing only SHA1 hashes? They are still considered experimental but should be backward-compatible at least. Random example: # This is supposed to work since git 2.45
$ git version
git version 2.45.0
# Create a repo using SHA256 hash
$ git init --object-format=sha256
# Check using different hash algo
$ git rev-parse --output-object-format=sha1 HEAD
f54f533028849a980fd290275629e66022f3a5c7
$ git rev-parse HEAD
c265ed589a863fcb8408aca716bdfb875ba62caa2b1ca27fb1608f93250c565a |
It's unlikely I'll be doing anything w.r.t. gitstatusd. I need to find time and motivation to make powerlevel10k work without it. There is also a possibility that I archive both repos but I hope it won't come to that. |
I see, thank you for making it clear.❤️ |
I have 2 repos initialized, the repo using SHA-256 for a hashing algorithm is not recognized by the
vcs
prompt.test_repo
-SHA-1
test_repo_256
-SHA-256
https://git-scm.com/docs/git-init#Documentation/git-init.txt---object-formatltformatgt
The text was updated successfully, but these errors were encountered: