Make `Choice` fields `pijul_config::Config` non-optional

finchie
Jul 29, 2025, 9:35 AM
TV7KEL6ZRISTBK6AKHFXMJI5D5W5SEOK6MOIZSVVX64Q5YUH3EVAC

Dependencies

  • [2] SEWGHUHQ .pijul/config: simplify remotes and hooks
  • [3] 5BB266P6 Optional colours in the global config file
  • [4] ZSFJT4SF Allow remotes to have a different push and pull address
  • [5] FVU3Y2U3 Adding a local "unrecord_changes" option in addition to the global one
  • [6] U6TQX5Z2 pager function respects cli option and user config files, PAGER env var
  • [7] ICEK2JVG Add reset_overwrites_changes config option. When set to never --force is required for reset
  • [8] NHVLSXLM Updating reset with the new CLI refactoring
  • [9] Z4PPQZUG Refactor `pijul-config` to support layered configuration
  • [10] YW6NICQV Migrate codebase to refactored `pijul_config` crate
  • [11] 2ZKE4XMJ Replace `pijul_repository::init_dot_ignore` with `pijul_config::Config::dot_ignore_contents`
  • [12] FVQYZQFL Create dialoguer themes based on global config
  • [13] SXEYMYF7 Fixing the bad changes in history (unfortunately, by rebooting).
  • [14] VQPAUKBQ channel switch as an alias to reset
  • [15] Y6EVFMTA Don't output files if they aren't in the current channel
  • [16] 56KJGRVO Remove `atty` dependency
  • [17] GLRGFBCW Checking the version of less we have
  • [18] VL7ZYKHB Running hooks through shell on Windows and Unix
  • [19] H4AU6QRP New config for HTTP remotes
  • [20] KWAGWB73 Adding extra dependencies from the config file

Change contents

  • replacement in pijul-config/src/lib.rs at line 63
    [5.41][7.78:128](),[5.41][3.252:315](),[7.128][3.252:315](),[2.67][3.252:315]()
    pub reset_overwrites_changes: Option<Choice>,
    pub colors: Option<Choice>,
    pub pager: Option<Choice>,
    [5.41]
    [9.5432]
    pub reset_overwrites_changes: Choice,
    pub colors: Choice,
    pub pager: Choice,
  • replacement in pijul-config/src/lib.rs at line 188
    [9.7951][9.7951:8011](),[9.8011][4.2398:2399](),[4.2398][4.2398:2399](),[4.2399][9.8012:8041]()
    let color_choice = self.colors.unwrap_or_default();
    match color_choice {
    [9.7951]
    [9.8041]
    match self.colors {
  • edit in pijul-config/src/defaults.toml at line 2
    [11.1935]
    [11.1935]
    reset_overwrites_changes = "auto"
    colors = "auto"
    pager = "auto"
  • replacement in pijul/src/commands/reset.rs at line 36
    [10.10181][10.10181:10262](),[10.10262][8.69:220](),[7.353][8.69:220]()
    let overwrite_changes = match config.reset_overwrites_changes.as_ref() {
    Some(pijul_config::Choice::Never) => false,
    Some(pijul_config::Choice::Auto) | Some(pijul_config::Choice::Always) | _ => true,
    [10.10181]
    [7.507]
    let overwrite_changes = match config.reset_overwrites_changes {
    pijul_config::Choice::Never => false,
    pijul_config::Choice::Auto | pijul_config::Choice::Always => true,
  • replacement in pijul/src/commands/mod.rs at line 142
    [10.13028][10.13028:13090]()
    if let Some(pijul_config::Choice::Never) = config.pager {
    [10.13028]
    [6.546]
    if let pijul_config::Choice::Never = config.pager {
  • replacement in pijul/src/commands/diff.rs at line 349
    [10.15060][10.15060:15198]()
    Some(pijul_config::Choice::Always) => colors = true,
    Some(pijul_config::Choice::Never) => colors = false,
    _ => {}
    [10.15060]
    [10.15198]
    pijul_config::Choice::Auto => (),
    pijul_config::Choice::Always => colors = true,
    pijul_config::Choice::Never => colors = false,
  • replacement in pijul/src/commands/diff.rs at line 354
    [10.15229][10.15229:15290]()
    Some(pijul_config::Choice::Never) => colors = false,
    [10.15229]
    [10.15290]
    pijul_config::Choice::Never => colors = false,