Init feature; specific .ignore configs
Dependencies
- [2]
RUBBHYZ7Removing unnecessary async/await - [3]
Q7CHNDXNInit repo with default .ignore file - [4]
LYTVEPH3Avoid cloning into an existing path - [5]
SXEYMYF7Fixing the bad changes in history (unfortunately, by rebooting). - [6]
BZSC7VMYaddress clippy lints - [7]
ZBNKSYA6Fixing a bus error when starting a transaction on a full disk - [8]
EUZFFJSOUpdating Pijul with the latest changes in Libpijul - [9]
RGJWLQWBWhen cloning, try to init *before* setting up the path Drop (pijul::commands::clone::RepoPath) - [10]
SQVWP4LUWhen clone fails, only remove directories we have created (not other directories) - [11]
I24UEJQLVarious post-fire fixes - [12]
B3QWIGDEFixing the Git features with the latest Pijul (+ conflicts in Cargo.toml) - [13]
JL4WKA5PImplement the Sanakirja concurrency model in a cross-process way - [*]
AEPEFS7OWrite help for each argument
Change contents
- replacement in pijul/src/repository.rs at line 20
pub const DEFAULT_IGNORE: [&[u8]; 2] = [b".git", b".DS_Store"];const DEFAULT_IGNORE: [&[u8]; 2] = [b".git", b".DS_Store"];// Static KV map of names for project kinds |-> elements// that should go in the `.ignore` file by default.const IGNORE_KINDS: &[(&[&str], &[&[u8]])] = &[(&["rust"], &[b"/target", b"Cargo.lock"]),(&["node", "nodejs"], &[b"node_modules"]),(&["lean"], &[b"/build"]),]; - replacement in pijul/src/repository.rs at line 90
pub fn init(path: Option<std::path::PathBuf>) -> Result<Self, anyhow::Error> {pub fn init(path: Option<std::path::PathBuf>,kind: Option<&String>,) -> Result<Self, anyhow::Error> { - replacement in pijul/src/repository.rs at line 107
init_dot_ignore(cur.clone())?;init_dot_ignore(cur.clone(), kind)?; - replacement in pijul/src/repository.rs at line 130
fn init_dot_ignore(base_path: std::path::PathBuf) -> Result<(), anyhow::Error> {fn init_dot_ignore(base_path: std::path::PathBuf,kind: Option<&String>,) -> Result<(), anyhow::Error> { - edit in pijul/src/repository.rs at line 151
ignore_specific(&mut dot_ignore, kind)}/// if `kind` matches any of the known project kinds, add the associated/// .ignore entries to the default `.ignore` file.fn ignore_specific(dot_ignore: &mut std::fs::File,kind: Option<&String>,) -> Result<(), anyhow::Error> {use std::io::Write;if let Some(kind) = kind {let entries = IGNORE_KINDS.iter().find(|(names, _)| names.iter().any(|x| kind.eq_ignore_ascii_case(x))).into_iter().flat_map(|(_, v)| v.iter());for entry in entries {dot_ignore.write(entry)?;dot_ignore.write(b"\n")?;}} - edit in pijul/src/commands/init.rs at line 13[4.136728][15.3123]
/// Project kind; if Pijul knows about your project kind, the .ignore file will be/// populated with a conservative list of commonly ignored entries./// Example: `pijul init --kind=rust`#[clap(long = "kind", short = 'k')]kind: Option<String>, - replacement in pijul/src/commands/init.rs at line 24
let repo = Repository::init(self.path)?;let repo = Repository::init(self.path, self.kind.as_ref())?; - replacement in pijul/src/commands/clone.rs at line 75
let mut repo = Repository::init(Some(path))?;let mut repo = Repository::init(Some(path), None)?;