"Johannes Schindelin via GitGitGadget" <gitgitgadget@xxxxxxxxx> 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.