Creates a new branch with the given properties. The branch starts in the [`BranchState::Alive`] state with an empty content hash.
(id: BranchId, trunk: TrunkId)
| 153 | /// The branch starts in the [`BranchState::Alive`] state with |
| 154 | /// an empty content hash. |
| 155 | pub fn new(id: BranchId, trunk: TrunkId) -> Self { |
| 156 | Branch { |
| 157 | id, |
| 158 | trunk, |
| 159 | state: BranchState::Alive, |
| 160 | line_hash: Self::FNV_OFFSET_BASIS, |
| 161 | } |
| 162 | } |
| 163 | |
| 164 | /// Creates a new branch with a pre-computed hash. |
| 165 | pub fn with_hash(id: BranchId, trunk: TrunkId, line_hash: u64) -> Self { |
nothing calls this directly
no outgoing calls
no test coverage detected