♻️ Refactor diff command's handling of repo and channel

berkus
Jun 24, 2025, 3:39 PM
H2KBZD7Y3NNIYVLDETVWJSFLYDUR43N4O25CSHM2XFAAK5PRDR6QC

Dependencies

  • [2] SXEYMYF7 Fixing the bad changes in history (unfortunately, by rebooting).
  • [3] KWAMD2KR A few fixes in the documentation comments
  • [4] EUZFFJSO Updating Pijul with the latest changes in Libpijul
  • [5] V6J6DTJC Do not compute the entire diff if all we want is --json --untracked
  • [6] Y2Y4OOIE Move `pijul::DEFAULT_CHANNEL` to `libpijul`
  • [7] S4ZDDHTL Refactor diff command's handling of repo and channel
  • [8] ABQDWHNG Migrate from `pijul::repository` to `pijul-repository`
  • [9] J33DKFPM Do not traverse unindexed directories in `pijul diff -su`
  • [10] PIQCNEEB Upgrading to Clap 3.0.0-alpha.5
  • [11] 5OGOE4VW Store the current channel in the pristine
  • [12] L4JXJHWX pijul/*: reorganize imports and remove extern crate

Change contents

  • replacement in pijul/src/commands/diff.rs at line 11
    [2.173739][7.54:98]()
    use crate::commands::common_opts::RepoPath;
    [2.173739]
    [7.98]
    use crate::commands::common_opts::RepoAndChannel;
  • replacement in pijul/src/commands/diff.rs at line 18
    [7.121][7.121:145]()
    pub base: RepoPath,
    [7.121]
    [3.2866]
    pub base: RepoAndChannel,
  • edit in pijul/src/commands/diff.rs at line 22
    [2.173896][7.146:206](),[7.206][2.173896:173959](),[3.2984][2.173896:173959](),[2.173896][2.173896:173959]()
    /// Compare with CHANNEL instead of the current channel
    #[clap(long = "channel")]
    pub channel: Option<String>,
  • replacement in pijul/src/commands/diff.rs at line 53
    [5.306][7.274:362](),[7.362][4.16170:16196](),[6.965][4.16170:16196](),[4.16170][4.16170:16196]()
    let channel = get_channel(self.channel.as_deref(), &*txn.read())
    .0
    .to_string();
    [5.306]
    [4.16233]
    let channel = get_channel(self.base.channel(), &*txn.read()).0.to_string();