mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-18 10:07:28 +00:00
view: replace start_modification()
by Clone
impl
I'm pretty sure the `start_modification()` function is a leftover from when there was `ReadonlyView` and `MutableView`.
This commit is contained in:
parent
504148a81f
commit
69ff505338
2 changed files with 2 additions and 9 deletions
|
@ -431,7 +431,7 @@ impl MutableRepo {
|
|||
index: Arc<ReadonlyIndex>,
|
||||
view: &View,
|
||||
) -> MutableRepo {
|
||||
let mut_view = view.start_modification();
|
||||
let mut_view = view.clone();
|
||||
let mut_index = MutableIndex::incremental(index);
|
||||
MutableRepo {
|
||||
base_repo,
|
||||
|
|
|
@ -28,7 +28,7 @@ pub enum RefName {
|
|||
GitRef(String),
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Eq, Debug)]
|
||||
#[derive(PartialEq, Eq, Debug, Clone)]
|
||||
pub struct View {
|
||||
data: op_store::View,
|
||||
}
|
||||
|
@ -40,13 +40,6 @@ impl View {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn start_modification(&self) -> View {
|
||||
// TODO: Avoid the cloning of the sets here.
|
||||
View {
|
||||
data: self.data.clone(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn checkout(&self) -> &CommitId {
|
||||
&self.data.checkout
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue