update pull request
This commit is contained in:
@@ -107,6 +107,40 @@ impl Default for LocalReposSettings {
|
||||
}
|
||||
}
|
||||
|
||||
/// A remembered association between a local checkout folder and an
|
||||
/// announced repository. Recorded when the user clones a repository from
|
||||
/// the app or picks a folder in the New PR panel, so the panel can prefill
|
||||
/// the folder later without asking again.
|
||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(default)]
|
||||
pub struct CheckoutRecord {
|
||||
/// Local folder of the checkout.
|
||||
pub path: PathBuf,
|
||||
/// Repository address (`30617:<pubkey>:<id>`) as a string.
|
||||
pub addr: String,
|
||||
/// Unix seconds of the last use, for freshest-first ordering.
|
||||
pub last_used: u64,
|
||||
}
|
||||
|
||||
impl Default for CheckoutRecord {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
path: PathBuf::new(),
|
||||
addr: String::new(),
|
||||
last_used: 0,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Remembered local checkouts (see [`CheckoutRecord`]).
|
||||
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(default)]
|
||||
pub struct CheckoutsSettings {
|
||||
/// The remembered records; the latest use of a path+repo pair replaces
|
||||
/// the older record.
|
||||
pub records: Vec<CheckoutRecord>,
|
||||
}
|
||||
|
||||
/// The create-repository dialog.
|
||||
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(default)]
|
||||
@@ -128,6 +162,8 @@ pub struct Settings {
|
||||
pub grasp_servers: GraspServersSettings,
|
||||
/// Local repository scanning.
|
||||
pub local_repos: LocalReposSettings,
|
||||
/// Remembered local checkouts.
|
||||
pub checkouts: CheckoutsSettings,
|
||||
/// The create-repository dialog.
|
||||
pub create_repository: CreateRepositorySettings,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user