Add cmd flags to support histogram diff algorithm

hardy7cc
Mar 1, 2025, 10:49 PM
VQACP66GFLOYMNES2HTOAI3GCDFAL5UI72WOAB7S2IE3SWNQ6SFAC

Dependencies

  • [2] Y6TBQN7M Automatically format `pijul` crate
  • [3] I24UEJQL Various post-fire fixes
  • [4] AGHLXLIT record: ensure identity argument is used
  • [5] SXEYMYF7 Fixing the bad changes in history (unfortunately, by rebooting).
  • [6] OY3CGEHQ Early stop in the diff algorithms for diff --short
  • [7] OU243LAB Support for staging
  • [8] 36PM475P Fixing diff in the non-"--short" case
  • [9] MDY344ZZ Options to use Patience diff instead of Myers
  • [10] HKHMES6T Solving conflicts

Change contents

  • edit in pijul/src/commands/record.rs at line 59
    [3.115]
    [3.102757]
    /// Use Histogram diff algorithm instead of the default
    #[clap(long = "histogram")]
    pub histogram: bool,
  • edit in pijul/src/commands/record.rs at line 319
    [3.875]
    [3.106964]
    if self.patience && self.histogram {
    log::warn!("Only specify one algorithm option.")
    }
    let algorithm = if self.patience {
    libpijul::Algorithm::Patience
    } else if self.histogram {
    libpijul::Algorithm::ImaraHistogram
    } else {
    libpijul::Algorithm::default()
    };
  • replacement in pijul/src/commands/record.rs at line 338
    [3.13989][3.116:356]()
    if self.patience {
    libpijul::Algorithm::Patience
    } else {
    libpijul::Algorithm::default()
    },
    [3.13989]
    [3.44]
    algorithm,
  • replacement in pijul/src/commands/record.rs at line 352
    [3.14195][3.357:557]()
    if self.patience {
    libpijul::Algorithm::Patience
    } else {
    libpijul::Algorithm::default()
    },
    [3.14195]
    [3.80]
    algorithm,
  • replacement in pijul/src/commands/record.rs at line 366
    [3.14343][2.642:822]()
    if self.patience {
    libpijul::Algorithm::Patience
    } else {
    libpijul::Algorithm::default()
    },
    [3.14343]
    [3.14343]
    algorithm,
  • edit in pijul/src/commands/diff.rs at line 38
    [3.874]
    [3.174036]
    /// Use Histogram diff algorithm instead of the default
    #[clap(long = "histogram")]
    pub histogram: bool,
  • edit in pijul/src/commands/diff.rs at line 71
    [3.174455]
    [3.174455]
    if self.patience && self.histogram {
    log::warn!("Only specify one algorithm option.")
    }
    let algorithm = if self.patience {
    libpijul::Algorithm::Patience
    } else if self.histogram {
    libpijul::Algorithm::ImaraHistogram
    } else {
    libpijul::Algorithm::default()
    };
  • replacement in pijul/src/commands/diff.rs at line 84
    [3.20138][3.875:1055]()
    if self.patience {
    libpijul::Algorithm::Patience
    } else {
    libpijul::Algorithm::default()
    },
    [3.20138]
    [3.0]
    algorithm,
  • replacement in pijul/src/commands/diff.rs at line 97
    [3.20279][3.1056:1236]()
    if self.patience {
    libpijul::Algorithm::Patience
    } else {
    libpijul::Algorithm::default()
    },
    [3.20279]
    [3.20279]
    algorithm,