|
1 | 1 | // TODO: remove this - only needed while &mut Vec<u8> isn't used.
|
2 | 2 | #![allow(clippy::ptr_arg)]
|
3 | 3 |
|
| 4 | +use crate::blob::platform::{DriverChoice, ResourceRef}; |
4 | 5 | use bstr::BString;
|
5 | 6 | use std::path::PathBuf;
|
6 | 7 |
|
@@ -157,3 +158,20 @@ pub struct Platform {
|
157 | 158 | /// The way we convert resources into mergeable states.
|
158 | 159 | filter_mode: pipeline::Mode,
|
159 | 160 | }
|
| 161 | + |
| 162 | +/// The product of a [`prepare_merge()`](Platform::prepare_merge()) call to finally |
| 163 | +/// perform the merge and retrieve the merge results. |
| 164 | +#[derive(Copy, Clone)] |
| 165 | +pub struct PlatformRef<'parent> { |
| 166 | + /// The platform that hosts the resources, used to access drivers. |
| 167 | + pub(super) parent: &'parent Platform, |
| 168 | + /// The current or our side of the merge operation. |
| 169 | + pub current: ResourceRef<'parent>, |
| 170 | + /// The ancestor or base of the merge operation. |
| 171 | + pub ancestor: ResourceRef<'parent>, |
| 172 | + /// The other or their side of the merge operation. |
| 173 | + pub other: ResourceRef<'parent>, |
| 174 | + /// Which driver to use according to the resource's configuration, |
| 175 | + /// using the path of `current` to read git-attributes. |
| 176 | + pub driver: DriverChoice, |
| 177 | +} |
0 commit comments