Skip to content

Commit b364a42

Browse files
committed
Simplify hook construction
1 parent fce7fb6 commit b364a42

5 files changed

Lines changed: 258 additions & 358 deletions

File tree

crates/prek/src/cli/cache_gc.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -387,12 +387,11 @@ fn hook_env_requirements_from_config(
387387
let remote_repo = RepoIdentityRef::new(repo_config.source(), &repo_config.rev);
388388

389389
for hook_config in &repo_config.hooks {
390-
let Some(manifest_hook) = repo.get_hook(&hook_config.id) else {
390+
let Some(manifest_hook) = repo.manifest_hook(&hook_config.id) else {
391391
continue;
392392
};
393393

394-
let mut hook_spec = manifest_hook.clone();
395-
hook_spec.apply_remote_hook_overrides(hook_config);
394+
let hook_spec = HookSpec::from_remote(manifest_hook.clone(), hook_config);
396395

397396
match HookEnvRequirement::from_hook_spec(config, hook_spec, Some(remote_repo)) {
398397
Ok(Some(requirement)) => requirements.push(requirement),

0 commit comments

Comments
 (0)