Thread (1 message) 1 message, 1 author, 2020-08-14

Re: [PATCH 2/3] commit-graph: use the hash version byte

From: Junio C Hamano <hidden>
Date: 2020-08-14 20:22:36

"brian m. carlson" [off-list ref] writes:
Can we maybe say something like this?

  switch (hash_algo_by_ptr(the_hash_algo)) {
    case GIT_HASH_SHA1:
      return 1;
    case GIT_HASH_SHA256:
      return 2;
    default:
      die(_("invalid hash version"));
  }

That way if SHA-256 gets broken and we switch to another 256-bit hash
(SHA-3-256?), we'll be forced to update this properly.
Excellent.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help