Customizable ignore_kinds (and a fix of .write())

pmeunier
Aug 4, 2021, 1:03 PM
CB7UPUQFOUH6M32KXQZL25EV4IH3XSK56RG3OYNRZBBFEABSNCXQC

Dependencies

  • [2] H72JG6HL Init feature; specific .ignore configs
  • [3] Q7CHNDXN Init repo with default .ignore file
  • [4] SXEYMYF7 Fixing the bad changes in history (unfortunately, by rebooting).
  • [5] BZSC7VMY address clippy lints
  • [*] TFPETWTV Add config options for patch message templates
  • [*] 5BB266P6 Optional colours in the global config file

Change contents

  • replacement in pijul/src/repository.rs at line 21
    [2.60][2.60:118]()
    // Static KV map of names for project kinds |-> elements
    [2.60]
    [2.118]
    // Static KV map of names for project kinds |-> elements
  • replacement in pijul/src/repository.rs at line 148
    [3.1027][3.1027:1104]()
    dot_ignore.write(default_ignore)?;
    dot_ignore.write(b"\n")?;
    [3.1027]
    [3.1104]
    dot_ignore.write_all(default_ignore)?;
    dot_ignore.write_all(b"\n")?;
  • edit in pijul/src/repository.rs at line 162
    [2.984]
    [2.984]
    if let Ok((config, _)) = crate::config::Global::load() {
    let ignore_kinds = config.ignore_kinds.as_ref();
    if let Some(kinds) = ignore_kinds.and_then(|x| x.get(kind)) {
    for entry in kinds.iter() {
    writeln!(dot_ignore, "{}", entry)?;
    }
    return Ok(());
    }
    }
  • replacement in pijul/src/repository.rs at line 177
    [2.1220][2.1220:1296]()
    dot_ignore.write(entry)?;
    dot_ignore.write(b"\n")?;
    [2.1220]
    [2.1296]
    dot_ignore.write_all(entry)?;
    dot_ignore.write_all(b"\n")?;
  • edit in pijul/src/config.rs at line 16
    [7.62]
    [8.63]
    pub ignore_kinds: Option<HashMap<String, Vec<String>>>,