2

I'd like to use SHA-512 as the hash function within a git repository. Is this possible without modifying the source code for git itself? I came across this post from years ago here on StackOverflow suggesting it was an upcoming feature at the time, but have been unable to locate documentation on it thus far.

CoryG
  • 2,429
  • 3
  • 25
  • 60
  • 4
    You can technically create a repo that uses `sha256`, but it's still considered experimental. See the man page on `git init --object-format` – mnestorov Aug 30 '21 at 06:45

1 Answers1

4

I wrote the post you mention, and detailed the reasons behind that change in "Git is moving to new hashing algorithm SHA-256 but why git community settled on SHA‑256"

The transition is still in progress, and explained in "Documentation/technical/hash-function-transition.txt"

That document will give you a good idea of the steps necessary to be completed before Git is able to use a different hash.
Those steps are still very much in progress.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250