| 1006 | } |
| 1007 | |
| 1008 | fn current() -> GuardEvidence { |
| 1009 | GuardEvidence { |
| 1010 | atomic: AtomicGuardEvidence { |
| 1011 | view: "main".to_string(), |
| 1012 | state: "atomic-1".to_string(), |
| 1013 | manifest_root: Some(root("root-1")), |
| 1014 | }, |
| 1015 | git: GuardGitEvidence::Repository(Box::new(GitGuardEvidence { |
| 1016 | head: GitHeadEvidence::Attached { |
| 1017 | symref: "refs/heads/main".to_string(), |
| 1018 | oid: "git-1".to_string(), |
| 1019 | }, |
| 1020 | head_tree: Some("tree-1".to_string()), |
| 1021 | index_tree: Some("tree-1".to_string()), |
| 1022 | index_digest: Some("index-1".to_string()), |
| 1023 | refs_digest: Some("refs-1".to_string()), |
| 1024 | refs: Vec::new(), |
| 1025 | admin: Some(admin()), |
| 1026 | index_lock: None, |
| 1027 | ref_locks: Vec::new(), |
| 1028 | operation_state: "Clean".to_string(), |
| 1029 | operation_markers: Vec::new(), |
| 1030 | conflict_stages: Vec::new(), |
| 1031 | manifest_root: Some(ManifestRootEvidence::git_tree("tree-1")), |
| 1032 | })), |
| 1033 | } |
| 1034 | } |
| 1035 | |
| 1036 | fn refusal(outcome: GuardOutcome) -> Box<GuardRefusal> { |
| 1037 | match outcome { |