From aa1dffe6edfa1e853e75e179ef9ef00ff3485dc7 Mon Sep 17 00:00:00 2001 From: "Jose \"Pepe\" Galmes" Date: Fri, 21 Nov 2025 16:43:17 +0000 Subject: [PATCH 1/2] Add GITSHA1 digest function. GITSHA1 is the digest function used by git. Details here: https://git-scm.com/book/be/v2/Git-Internals-Git-Objects. --- build/bazel/remote/execution/v2/remote_execution.proto | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build/bazel/remote/execution/v2/remote_execution.proto b/build/bazel/remote/execution/v2/remote_execution.proto index 40e34917..d01f14e5 100644 --- a/build/bazel/remote/execution/v2/remote_execution.proto +++ b/build/bazel/remote/execution/v2/remote_execution.proto @@ -2150,6 +2150,9 @@ message DigestFunction { // The BLAKE3 hash function. // See https://github.com/BLAKE3-team/BLAKE3. BLAKE3 = 9; + + // The SHA1 variant used by git. + GITSHA1 = 10; } } From 7ba7909ee435186daf35c8b884c6178ae489fe94 Mon Sep 17 00:00:00 2001 From: "Jose \"Pepe\" Galmes" Date: Thu, 11 Dec 2025 15:45:29 +0000 Subject: [PATCH 2/2] Add GITSHA1 digest function. GITSHA1 is the digest function used by git. Details here: https://git-scm.com/book/be/v2/Git-Internals-Git-Objects. --- build/bazel/remote/execution/v2/remote_execution.proto | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build/bazel/remote/execution/v2/remote_execution.proto b/build/bazel/remote/execution/v2/remote_execution.proto index d01f14e5..73597052 100644 --- a/build/bazel/remote/execution/v2/remote_execution.proto +++ b/build/bazel/remote/execution/v2/remote_execution.proto @@ -2151,7 +2151,11 @@ message DigestFunction { // See https://github.com/BLAKE3-team/BLAKE3. BLAKE3 = 9; - // The SHA1 variant used by git. + // Identical to SHA1, except that "blob ${sizeBytes}\0" is prepended to + // the blob's contents before hashing, where ${sizeBytes} corresponds to + // the decimal size of the original blob. This allows hashes of files to + // be converted from and to the ones used by the Git version control + // system. GITSHA1 = 10; } }