edit in pijul/tests/identity.rs at line 24
edit in pijul/tests/identity.rs at line 66
+ Some(Interaction::new(
+ prompt::SELECT_KEY,
+ InteractionType::Input(default::SSH.to_string()),
+ )),
edit in pijul/tests/identity.rs at line 96
edit in pijul/tests/identity.rs at line 123
edit in pijul/tests/identity.rs at line 144
edit in pijul/tests/identity.rs at line 165
edit in pijul/tests/identity.rs at line 198
edit in pijul/tests/identity.rs at line 210
edit in pijul/tests/identity.rs at line 270
+ Some(Interaction::new(
+ prompt::SELECT_KEY,
+ InteractionType::Input(default::SSH.to_string()),
+ )),
edit in pijul/tests/identity.rs at line 289
edit in pijul/tests/identity.rs at line 310
edit in pijul/tests/identity.rs at line 332
edit in pijul/tests/identity.rs at line 353
edit in pijul/tests/identity.rs at line 375
edit in pijul/tests/identity.rs at line 396
edit in pijul/tests/identity.rs at line 418
edit in pijul/tests/identity.rs at line 445
replacement in pijul/tests/identity.rs at line 459
[2.10567]→[2.10567:10590](∅→∅) edit in pijul/tests/identity.rs at line 467
edit in pijul/tests/common/identity.rs at line 20
+ pub const SSH: &str = ""; // Just confirm the first item in SSH option list
replacement in pijul/tests/common/identity.rs at line 25
[2.18469]→[2.18469:18517](∅→∅) − pub const FULL_NAME: &str = "Display name";
+ pub const DISPLAY_NAME: &str = "Display name";
replacement in pijul/tests/common/identity.rs at line 30
[2.18729]→[2.18729:18783](∅→∅) − pub const PASSWORD: &str = "Secret key password";
+ pub const PASSWORD: &str = "New password";
edit in pijul/tests/common/identity.rs at line 32
+ pub const SELECT_KEY: &str = "Select key";
edit in pijul/tests/common/identity.rs at line 35
+ pub const SSH: &str = "Do you want to change the default SSH key?";
+ pub const ENCRYPTION: &str = "Do you want to change the encryption?";
edit in pijul/tests/common/identity.rs at line 39
[2.19017]→[2.19017:19095](∅→∅) − pub const ENCRYPTION: &str = "Do you want to change the encryption?";
replacement in pijul/tests/common/identity.rs at line 56
[2.19321]→[2.19321:19356](∅→∅) − pub full_name: Option<String>,
+ pub display_name: Option<String>,
edit in pijul/tests/common/identity.rs at line 62
+ pub key_path: Option<Interaction>,
edit in pijul/tests/common/identity.rs at line 76
+ key_path: Option<Interaction>,
replacement in pijul/tests/common/identity.rs at line 82
[2.20070]→[2.20070:20093](∅→∅) + display_name: full_name,
edit in pijul/tests/common/identity.rs at line 88
replacement in pijul/tests/common/identity.rs at line 139
[2.21740]→[2.21740:21785](∅→∅) − self.full_name.as_ref().map_or_else(
+ self.display_name.as_ref().map_or_else(
replacement in pijul/tests/common/identity.rs at line 148
[2.22075]→[2.22075:22144](∅→∅) − toml_data.get("name").unwrap().as_str().unwrap()
+ toml_data.get("display_name").unwrap().as_str().unwrap()
replacement in pijul/tests/common/identity.rs at line 174
[2.22969]→[2.22969:23039](∅→∅) − toml_data.get("login").unwrap().as_str().unwrap()
+ toml_data.get("username").unwrap().as_str().unwrap()
replacement in pijul/tests/common/identity.rs at line 251
[2.25428]→[2.25428:25480](∅→∅) − pijul_cmd.arg("--no-prompt").arg("--name");
+ pijul_cmd.arg("--no-prompt");
replacement in pijul/tests/common/identity.rs at line 258
[2.25657]→[2.25657:25815](∅→∅) − pijul_cmd
− .arg(&old_name)
− .arg("--new-name")
− .arg(self.id_name.get_input(valid));
+ pijul_cmd.arg(&old_name);
+
+ let new_name = self.id_name.get_input(valid);
+ if old_name != &new_name {
+ pijul_cmd.arg("--new-name").arg(new_name);
+ }
replacement in pijul/tests/common/identity.rs at line 270
[2.25939]→[2.25939:25997](∅→∅) − if let Some(full_name) = self.full_name.clone() {
+ if let Some(full_name) = self.display_name.clone() {
edit in pijul/tests/common/identity.rs at line 303
+ // Interatction tree
+ // ├── Identity name
+ // ├── Display name
+ // ├── Email
+ // ├── Encryption
+ // │ ├── Password
+ // │ └── Confirm
+ // ├── Expiry
+ // │ └── Date
+ // └── Link to remote
+ // ├── Username
+ // ├── Origin
+ // └── Default SSH key
+ // └── Key path
edit in pijul/tests/common/identity.rs at line 318
+
+ // Interaction: ID name
replacement in pijul/tests/common/identity.rs at line 322
[2.27277]→[2.27277:27418](∅→∅) − if let Some(full_name) = self.full_name.clone() {
− Interaction::new(prompt::FULL_NAME, InteractionType::Input(full_name))
+ // Interaction: Display name
+ if let Some(display_name) = self.display_name.clone() {
+ Interaction::new(prompt::DISPLAY_NAME, InteractionType::Input(display_name))
replacement in pijul/tests/common/identity.rs at line 327
[2.27477]→[2.27477:27564](∅→∅) − Interaction::new(prompt::FULL_NAME, InteractionType::Input(String::new()))
+ Interaction::new(prompt::DISPLAY_NAME, InteractionType::Input(String::new()))
edit in pijul/tests/common/identity.rs at line 331
edit in pijul/tests/common/identity.rs at line 339
+
+ // Interaction: Encryption
+ Interaction::new(
+ format!(
+ "{} (Current status: not encrypted)",
+ prompt::confirm::ENCRYPTION
+ ),
+ InteractionType::Confirm(self.password.is_some()),
+ )
+ .interact(&mut session)?;
+ if let Some(password) = self.password.clone() {
+ password.interact(&mut session)?;
+ }
edit in pijul/tests/common/identity.rs at line 353
replacement in pijul/tests/common/identity.rs at line 363
[2.28152]→[2.28152:28225](∅→∅) − let remote_data = self.login.is_some() || self.origin.is_some();
+ // Interaction: Link remote
+ let remote_data = self.login.is_some() || self.origin.is_some() || self.key_path.is_some();
edit in pijul/tests/common/identity.rs at line 385
[2.29027]→[2.29027:29037](∅→∅) replacement in pijul/tests/common/identity.rs at line 386
[2.29038]→[2.29038:29407](∅→∅) − Interaction::new(
− format!(
− "{} (Current status: not encrypted)",
− prompt::confirm::ENCRYPTION
− ),
− InteractionType::Confirm(self.password.is_some()),
− )
− .interact(&mut session)?;
− if let Some(password) = self.password.clone() {
− password.interact(&mut session)?;
+ Interaction::new(
+ prompt::confirm::SSH,
+ InteractionType::Confirm(self.key_path.is_some()),
+ )
+ .interact(&mut session)?;
+ if let Some(key_path) = self.key_path.clone() {
+ key_path.interact(&mut session)?;
+ }
replacement in pijul/src/identity/repair.rs at line 292
[4.1595]→[4.1595:1635](∅→∅) − author.user_name = identity
+ author.username = identity
replacement in pijul/src/identity/repair.rs at line 294
[4.14443]→[4.1636:1718](∅→∅) − .map_or_else(String::new, |x| x.config.author.user_name.clone());
+ .map_or_else(String::new, |x| x.config.author.username.clone());
replacement in pijul/src/identity/mod.rs at line 286
[4.19976]→[4.8084:8153](∅→∅) − let has_username = !self.config.author.user_name.is_empty();
+ let has_username = !self.config.author.username.is_empty();
replacement in pijul/src/identity/mod.rs at line 292
[4.20227]→[4.8218:8290](∅→∅) − self.config.author.user_name, self.config.author.origin
+ self.config.author.username, self.config.author.origin
replacement in pijul/src/identity/mod.rs at line 295
[4.20333]→[4.8291:8357](∅→∅) − Some(format!(" [@{}]", self.config.author.user_name))
+ Some(format!(" [@{}]", self.config.author.username))
edit in pijul/src/identity/create.rs at line 86
[4.9519]→[4.9519:10005](∅→∅) − "Would you like to change the default SSH key? (Current key: {})",
− if let Some(path) = &self.config.key_path {
− format!("{path:#?}")
− } else {
− String::from("none")
− }
− ))
− .default(false)
− .interact()?
− {
− new_identity.prompt_ssh().await?;
− }
−
− if Confirm::with_theme(config.as_ref())
− .with_prompt(&format!(
edit in pijul/src/identity/create.rs at line 109
+ } else {
+ // The user wants an 'offline' identity, so make sure not to store login info
+ new_identity.config.key_path = None;
+ new_identity.config.author.username = String::new();
+ new_identity.config.author.origin = String::new();
replacement in pijul/src/identity/create.rs at line 161
[4.12545]→[4.12545:12619](∅→∅) − self.config.author.user_name = Input::with_theme(config.as_ref())
+ self.config.author.username = Input::with_theme(config.as_ref())
replacement in pijul/src/identity/create.rs at line 164
[4.12704]→[4.12704:12766](∅→∅) − .with_initial_text(&self.config.author.user_name)
+ .with_initial_text(&self.config.author.username)
edit in pijul/src/identity/create.rs at line 175
+ if Confirm::with_theme(config.as_ref())
+ .with_prompt(&format!(
+ "Do you want to change the default SSH key? (Current key: {})",
+ if let Some(path) = &self.config.key_path {
+ format!("{path:#?}")
+ } else {
+ String::from("none")
+ }
+ ))
+ .default(false)
+ .interact()
+ .unwrap()
+ {
+ self.prompt_ssh().await?;
+ }
+
replacement in pijul/src/identity/create.rs at line 285
[4.37098]→[4.13744:13814](∅→∅) − &self.config.author.user_name, &self.config.author.origin
+ &self.config.author.username, &self.config.author.origin
replacement in pijul/src/config.rs at line 22
[4.182]→[4.14271:14349](∅→∅) − // Older versions called this 'name', but 'user_name' is more descriptive
+ // Older versions called this 'name', but 'username' is more descriptive
replacement in pijul/src/config.rs at line 24
[4.14429]→[4.14429:14456](∅→∅) replacement in pijul/src/config.rs at line 39
[4.14987]→[4.14987:15025](∅→∅) − user_name: String::new(),
+ username: String::new(),
replacement in pijul/src/commands/log.rs at line 396
[4.15914]→[4.15914:15987](∅→∅) − e.insert(id.config.author.user_name)
+ e.insert(id.config.author.username)
replacement in pijul/src/commands/log.rs at line 402
[4.16291]→[4.16291:16362](∅→∅) − id.config.author.user_name
+ id.config.author.username
replacement in pijul/src/commands/log.rs at line 408
[4.16599]→[4.16599:16671](∅→∅) − id.config.author.user_name,
+ id.config.author.username,
replacement in pijul/src/commands/identity.rs at line 74
[4.42808]→[4.42808:42895](∅→∅) − .args(&["display-name", "email", "expiry", "username", "remote", "name"]),
+ .args(&["display-name", "email", "expiry", "username", "remote", "name", "password"]),
replacement in pijul/src/commands/identity.rs at line 96
[4.43775]→[4.43775:43861](∅→∅) − #[clap(long = "name", value_parser = name_does_not_exist, display_order = 3)]
+ #[clap(value_parser = name_does_not_exist)]
replacement in pijul/src/commands/identity.rs at line 110
[4.44349]→[4.44349:44440](∅→∅) − .args(&["display-name", "email", "new-name", "expiry", "username", "remote"]),
+ .args(&["display-name", "email", "new-name", "expiry", "username", "remote", "password"]),
replacement in pijul/src/commands/identity.rs at line 114
− #[clap(group("name"), value_parser = name_exists, display_order = 2)]
+ #[clap(group("name"), value_parser = name_exists)]
replacement in pijul/src/commands/identity.rs at line 208
[4.47648]→[4.47648:47700](∅→∅) − .with_prompt("Secret key password")
+ .with_prompt("New password")
replacement in pijul/src/commands/identity.rs at line 223
[4.17085]→[4.17085:17162](∅→∅) − user_name: login.unwrap_or(default.config.author.user_name),
+ username: login.unwrap_or(default.config.author.username),
replacement in pijul/src/commands/identity.rs at line 305
[4.51088]→[4.18110:18194](∅→∅) − let username = if identity.config.author.user_name.is_empty() {
+ let username = if identity.config.author.username.is_empty() {
replacement in pijul/src/commands/identity.rs at line 308
[4.51243]→[4.18235:18293](∅→∅) − &identity.config.author.user_name
+ &identity.config.author.username