pijul add: Print actual number of paths added

dblsaiko
Mar 27, 2024, 3:16 PM
EAMSUDCLGVDJIPVXJHON6WBLXHTALCR756XUXAE7Z3WTSNAJGUJAC

Dependencies

  • [2] ZDK3GNDB Tag transactions (including a massive refactoring of errors)
  • [3] UAXGGNAZ Improve command feedback
  • [4] YGPEHOTE libpijul::fs::add_{file,dir} now return the created Inode
  • [5] G7VOM2IM Returning an error when recording non-existent paths
  • [6] J33DKFPM Do not traverse unindexed directories in `pijul diff -su`
  • [7] 2RXOCWUW Making libpijul deterministic (and getting rid of `rand`)
  • [8] 4OCC6D42 Recursive add
  • [9] OJZWJUF2 MUCH faster `pijul add -r`
  • [10] 3SJ3DJNF Adding a --force option to `pijul add`, to include otherwise ignored files
  • [11] HSEYMLO2 Adding an untracked change iterator
  • [12] SXEYMYF7 Fixing the bad changes in history (unfortunately, by rebooting).
  • [13] RZ2FSIQ2 Fixing `pijul add -r .`
  • [14] CCLLB7OI Upgrading to Sanakirja 0.15 + version bump
  • [15] EUZFFJSO Updating Pijul with the latest changes in Libpijul
  • [16] I24UEJQL Various post-fire fixes
  • [17] LOJL4HMY Recording a prefix we just deleted (mostly useful in `pijul git`, regular records returned NotFound)
  • [*] 4VWXL6KQ Correct handling of ignore files

Change contents

  • edit in pijul/src/commands/file_operations.rs at line 135
    [19.44]
    [4.171551]
    let mut paths_tracked = 0;
  • replacement in pijul/src/commands/file_operations.rs at line 154
    [4.187][4.87:137](),[4.87][4.87:137]()
    repo.working_copy.add_prefix_rec(
    [4.187]
    [4.41]
    paths_tracked += repo.working_copy.add_prefix_rec(
  • replacement in pijul/src/commands/file_operations.rs at line 161
    [4.1369][4.272:291](),[4.272][4.272:291]()
    )?
    [4.1369]
    [4.172084]
    )?;
  • edit in pijul/src/commands/file_operations.rs at line 187
    [19.784]
    [19.784]
    } else {
    paths_tracked += 1;
  • replacement in pijul/src/commands/file_operations.rs at line 194
    [4.15998][3.1512:1588]()
    writeln!(stderr, "Tracked {} path(s)", self.paths.iter().count())?;
    [4.15998]
    [3.1588]
    writeln!(stderr, "Tracked {} path(s)", paths_tracked)?;
  • replacement in libpijul/src/working_copy/filesystem.rs at line 240
    [4.1841][2.8666:8701]()
    ) -> Result<(), AddError<T>> {
    [4.1841]
    [4.3637]
    ) -> Result<usize, AddError<T>> {
    let mut paths_tracked = 0;
  • replacement in libpijul/src/working_copy/filesystem.rs at line 254
    [4.3975][4.129:157]()
    Ok(_) => {}
    [4.3975]
    [4.4004]
    Ok(_) => {
    paths_tracked += 1;
    }
  • replacement in libpijul/src/working_copy/filesystem.rs at line 261
    [4.4140][4.4140:4155]()
    Ok(())
    [4.4140]
    [4.4155]
    Ok(paths_tracked)