Build the refusal for an exact managed commit with a path Atomic cannot start tracking (a file replaced by a directory of the same name, for one). Skipping that path would record only part of the commit, so the turn records nothing instead. `None` when the turn has no exact managed commit, where skipping an unaddable path stays the best effort.
(
options: &TurnRecordOptions<'_>,
git_transition: &Option<RecordedGitTransition>,
add_error: &dyn std::fmt::Display,
)
| 1131 | /// turn records nothing instead. `None` when the turn has no exact managed |
| 1132 | /// commit, where skipping an unaddable path stays the best effort. |
| 1133 | fn unaddable_managed_commit_refusal( |
| 1134 | options: &TurnRecordOptions<'_>, |
| 1135 | git_transition: &Option<RecordedGitTransition>, |
| 1136 | add_error: &dyn std::fmt::Display, |
| 1137 | ) -> Option<InexactManagedCommit> { |
| 1138 | let transition = git_transition.as_ref()?; |
| 1139 | let commit = transition.exact_commit_oid.as_deref()?; |
| 1140 | let reason = format!("Atomic cannot track every path the commit adds: {add_error}"); |
| 1141 | Some(managed_commit_refusal(options, transition, commit, &reason)) |
| 1142 | } |
| 1143 | |
| 1144 | /// The durable refusal for a managed commit that is not recorded as-is. |
| 1145 | fn managed_commit_refusal( |
no test coverage detected