forked from mirrors/jj
working_copy: mark commit_id field in proto reserved
By marking it reserved, we prevent accidental use. We can still read working copy protos that have the field.
This commit is contained in:
parent
543036c753
commit
a66e2a0a6d
3 changed files with 1 additions and 11 deletions
|
@ -1533,7 +1533,6 @@ impl LocalWorkingCopy {
|
||||||
let proto = crate::protos::working_copy::Checkout {
|
let proto = crate::protos::working_copy::Checkout {
|
||||||
operation_id: operation_id.to_bytes(),
|
operation_id: operation_id.to_bytes(),
|
||||||
workspace_id: workspace_id.as_str().to_string(),
|
workspace_id: workspace_id.as_str().to_string(),
|
||||||
..Default::default()
|
|
||||||
};
|
};
|
||||||
let mut file = OpenOptions::new()
|
let mut file = OpenOptions::new()
|
||||||
.create_new(true)
|
.create_new(true)
|
||||||
|
@ -1638,7 +1637,6 @@ impl LocalWorkingCopy {
|
||||||
self.write_proto(crate::protos::working_copy::Checkout {
|
self.write_proto(crate::protos::working_copy::Checkout {
|
||||||
operation_id: self.operation_id().to_bytes(),
|
operation_id: self.operation_id().to_bytes(),
|
||||||
workspace_id: self.workspace_id().as_str().to_string(),
|
workspace_id: self.workspace_id().as_str().to_string(),
|
||||||
..Default::default()
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -66,8 +66,5 @@ message Checkout {
|
||||||
// TODO: Is it better to make this a UUID and a have map that to a name in
|
// TODO: Is it better to make this a UUID and a have map that to a name in
|
||||||
// config? That way users can rename a workspace.
|
// config? That way users can rename a workspace.
|
||||||
string workspace_id = 3;
|
string workspace_id = 3;
|
||||||
// The checked-out commit, which can be viewed as a cache of the working-copy
|
reserved 1;
|
||||||
// commit ID recorded in `operation_id`'s operation. No longer used.
|
|
||||||
// TODO: Delete this mid 2022 or so
|
|
||||||
bytes commit_id = 1;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,11 +71,6 @@ pub struct Checkout {
|
||||||
/// config? That way users can rename a workspace.
|
/// config? That way users can rename a workspace.
|
||||||
#[prost(string, tag = "3")]
|
#[prost(string, tag = "3")]
|
||||||
pub workspace_id: ::prost::alloc::string::String,
|
pub workspace_id: ::prost::alloc::string::String,
|
||||||
/// The checked-out commit, which can be viewed as a cache of the working-copy
|
|
||||||
/// commit ID recorded in `operation_id`'s operation. No longer used.
|
|
||||||
/// TODO: Delete this mid 2022 or so
|
|
||||||
#[prost(bytes = "vec", tag = "1")]
|
|
||||||
pub commit_id: ::prost::alloc::vec::Vec<u8>,
|
|
||||||
}
|
}
|
||||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
|
||||||
#[repr(i32)]
|
#[repr(i32)]
|
||||||
|
|
Loading…
Reference in a new issue