Thread (1 message) 1 message, 1 author, 2024-05-18

Re: [PATCH 5/8] hook(clone protections): add escape hatch

From: Junio C Hamano <hidden>
Date: 2024-05-18 00:21:58

"Johannes Schindelin via GitGitGadget" [off-list ref]
writes:
+static int is_hook_safe_during_clone(const char *name, const char *path, char *sha256)
+{
+	if (get_sha256_of_file_contents(path, sha256) < 0)
+		return 0;
+
+	if (!safe_hook_sha256s_initialized) {
+		safe_hook_sha256s_initialized = 1;
+		git_protected_config(safe_hook_cb, &safe_hook_sha256s);
+	}
+
+	return strset_contains(&safe_hook_sha256s, sha256);
+}
Makes sense.  Use of a hashmap/strset here makes sense.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help