Fixing the Git feature

pmeunier
Jun 29, 2021, 11:21 AM
NEJOYVJB4VXJJPFBWD2YK7PK6KKHQGRHIJHLEJ53HLQ3ZQRE5EPQC

Dependencies

  • [2] GUL4M5FI Cleanup and formatting
  • [3] 5SLOJYHG Fixing the Git feature
  • [4] JL4WKA5P Implement the Sanakirja concurrency model in a cross-process way
  • [5] B3QWIGDE Fixing the Git features with the latest Pijul (+ conflicts in Cargo.toml)
  • [6] SXEYMYF7 Fixing the bad changes in history (unfortunately, by rebooting).
  • [7] BXD3IQYN Fixing --features git
  • [8] HWH4WWN3 Proper separation of Git commit messages into a message and description fields in changes
  • [9] L2LPPKD4 Fixing the Git feature

Change contents

  • replacement in pijul/src/commands/git.rs at line 45
    [3.14293][3.14293:14384]()
    let repo = if let Ok(repo) = Repository::find_root(self.repo_path.clone()).await {
    [3.14293]
    [3.138182]
    let repo = if let Ok(repo) = Repository::find_root(self.repo_path.clone()) {
  • edit in pijul/src/commands/git.rs at line 457
    [3.151008][3.151008:151103](),[3.151103][3.2513:2551](),[3.110][3.151135:151142](),[3.526][3.151135:151142](),[3.2551][3.151135:151142](),[3.151135][3.151135:151142]()
    debug!(
    "last_recorded {:?}, name {:?}",
    repo.repo.config.current_channel,
    txn_.name(&*channel.read()?),
    );
  • edit in pijul/src/commands/git.rs at line 684
    [3.376]
    [3.158463]
    let mut author = BTreeMap::new();
    author.insert("name".to_string(), signature.name().unwrap().to_string());
    author.insert("email".to_string(), signature.email().unwrap().to_string());
  • replacement in pijul/src/commands/git.rs at line 696
    [3.398][3.158733:158961](),[3.158733][3.158733:158961]()
    authors: vec![libpijul::change::Author {
    name: signature.name().unwrap().to_string(),
    email: signature.email().map(|e| e.to_string()),
    full_name: None,
    }],
    [3.398]
    [2.1332]
    authors: vec![libpijul::change::Author(author)],
  • edit in pijul/src/commands/git.rs at line 708
    [3.159191]
    [3.3820]
    {
    let mut txn = txn.write().unwrap();
    let name = txn.name(&channel.read().unwrap()).to_string();
    txn.set_current_channel(&name)?;
    }
  • edit in pijul/src/commands/git.rs at line 730
    [3.159846][3.159846:159934](),[3.159934][3.4017:4075](),[3.315][3.159981:159994](),[3.1242][3.159981:159994](),[3.4075][3.159981:159994](),[3.159981][3.159981:159994](),[3.159994][3.4076:4172](),[3.405][3.160079:160115](),[3.1331][3.160079:160115](),[3.4172][3.160079:160115](),[3.160079][3.160079:160115]()
    if let Some(ref mut cur) = repo.repo.config.current_channel {
    cur.clear();
    cur.push_str(txn.name(&channel.read().unwrap()));
    } else {
    repo.repo.config.current_channel = Some(txn.name(&channel.read().unwrap()).to_string())
    }
    repo.repo.save_config()?;