In `pijul git`, avoid diffing files not modified by a commit
Dependencies
- [2]
WFXSB6RADo not run `pijul git` if there are uncommitted changes - [3]
OPC2VAZDWriting an initial config file at initialisation - [4]
RP7YRM5QImport Git repos without writing anything to disk - [5]
S7MPXAPHRemoving warnings in pijul::commands::git - [6]
CVAT6LN3Fixing git import, and adding more useful feedback (with `RUST_LOG="pijul=info"`) - [7]
I52XSRUHMassive cleanup, and simplification - [8]
RHHNPMZIFixing `pijul git` - [9]
SXEYMYF7Fixing the bad changes in history (unfortunately, by rebooting). - [10]
JL4WKA5PImplement the Sanakirja concurrency model in a cross-process way - [11]
BJOZ25EUDeterministic Git import - [12]
VU4KVXHWGit import was importing parents and hidden files (including .git), in some cases - [13]
GUL4M5FICleanup and formatting - [14]
NEJOYVJBFixing the Git feature - [15]
VGBH3ED6The Git feature does not need to be async - [16]
2RXOCWUWMaking libpijul deterministic (and getting rid of `rand`) - [17]
GBLM3JLRFix options of git subcommand - [18]
LGEJSLTYFixing output (including its uses in reset and pull) - [19]
AOKPEHAJFixing the `pijul git` command with the new init - [20]
5SLOJYHGFixing the Git feature - [21]
EUZFFJSOUpdating Pijul with the latest changes in Libpijul - [22]
WTRH4B2XFormatting - [23]
KWAMD2KRA few fixes in the documentation comments
Change contents
- replacement in pijul/src/commands/git.rs at line 6
use std::collections::{BTreeMap, BTreeSet};use std::collections::{BTreeMap, BTreeSet, HashSet}; - edit in pijul/src/commands/git.rs at line 14
/// Process this path instead of the current directory, creating a Pijul repository if necessary.pub git_path: Option<PathBuf>, - replacement in pijul/src/commands/git.rs at line 17
pub repo_path: Option<PathBuf>,pub pijul_path: Option<PathBuf>, - replacement in pijul/src/commands/git.rs at line 43
let repo = if let Ok(repo) = Repository::find_root(self.repo_path.clone()) {let repo = if let Ok(repo) = Repository::find_root(self.pijul_path.clone()) { - edit in pijul/src/commands/git.rs at line 45
} else {Repository::init(self.pijul_path.clone(), None, None)?};let git_path = if let Some(git_path) = self.git_path.clone() {git_path - replacement in pijul/src/commands/git.rs at line 51
Repository::init(self.repo_path.clone(), None, None)?repo.path.clone() - replacement in pijul/src/commands/git.rs at line 53
let git = git2::Repository::open(&repo.path)?;let git = git2::Repository::open(&git_path)?; - replacement in pijul/src/commands/git.rs at line 489
) -> Result<(git2::Object<'a>, BTreeMap<PathBuf, bool>), anyhow::Error> {) -> Result<(git2::Object<'a>, BTreeMap<PathBuf, bool>, HashSet<String>), anyhow::Error> { - edit in pijul/src/commands/git.rs at line 499
let mut pref = HashSet::new(); - replacement in pijul/src/commands/git.rs at line 558
let new_path = new_path.to_path_buf();prefixes.insert(new_path, is_dir);let new_path_ = new_path.to_path_buf();pref.insert(new_path.to_str().unwrap().to_string());prefixes.insert(new_path_, is_dir); - replacement in pijul/src/commands/git.rs at line 569
let old_path = old_path.to_path_buf();let new_path = new_path.to_path_buf();prefixes.insert(old_path, is_dir);prefixes.insert(new_path, is_dir);let old_path_ = old_path.to_path_buf();let new_path_ = new_path.to_path_buf();prefixes.insert(old_path_, is_dir);prefixes.insert(new_path_, is_dir);pref.insert(old_path.to_str().unwrap().to_string());pref.insert(new_path.to_str().unwrap().to_string()); - replacement in pijul/src/commands/git.rs at line 603
Ok((object, prefixes))Ok((object, prefixes, pref)) - edit in pijul/src/commands/git.rs at line 610
pref: HashSet<String>, - replacement in pijul/src/commands/git.rs at line 644
fn modified_time(&self, _: &str) -> Result<std::time::SystemTime, Self::Error> {Ok(std::time::SystemTime::now())fn modified_time(&self, x: &str) -> Result<std::time::SystemTime, Self::Error> {if self.pref.contains(x) {Ok(std::time::SystemTime::now())} else {Ok(std::time::SystemTime::UNIX_EPOCH)} - replacement in pijul/src/commands/git.rs at line 663
let (object, prefixes) = git_reset(git, repo, &txn, &channel, child, stats)?;let (object, prefixes, prefstr) = git_reset(git, repo, &txn, &channel, child, stats)?; - edit in pijul/src/commands/git.rs at line 731
pref: prefstr,