Skip to content

Commit

Permalink
remove --fetch-thread-count long option (-j remains)
Browse files Browse the repository at this point in the history
  • Loading branch information
drdo committed Jul 22, 2024
1 parent 6520235 commit aeac2be
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
24 changes: 10 additions & 14 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,24 +82,20 @@ mod util;
struct Cli {
#[arg(short = 'r', long)]
repo: Option<String>,

#[arg(long)]
password_command: Option<String>,
#[arg(
short = 'j',
long,
default_value_t = 4,
long_help = "
How many restic subprocesses to spawn concurrently.
If you get ssh-related errors or too much memory use
try lowering this."
)]
fetching_thread_count: usize,

/// How many restic subprocesses to spawn concurrently.
///
/// If you get ssh-related errors or too much memory use try lowering this.
#[arg(short = 'j', value_name = "NUMBER", default_value_t = 4)]
parallelism: usize,

/// Log verbosity level. You can pass it multiple times (maxes out at two).
#[arg(
short = 'v',
action = clap::ArgAction::Count,
long_help =
"Log verbosity level. You can pass it multiple times (maxes out at two)."
)]
verbose: u8,

Expand Down Expand Up @@ -179,7 +175,7 @@ fn main() -> anyhow::Result<()> {
}
};

sync_snapshots(&restic, &mut cache, cli.fetching_thread_count)?;
sync_snapshots(&restic, &mut cache, cli.parallelism)?;

let entries = cache.get_entries(None)?;
if entries.is_empty() {
Expand Down
2 changes: 1 addition & 1 deletion src/restic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ pub fn escape_for_exclude(path: &str) -> Cow<str> {
fn push_as_inverse_range(buf: &mut String, c: char) {
#[rustfmt::skip]
let cs = [
'[', '^',
'[', '^',
char::MIN, '-', char::backward(c, 1),
char::forward(c, 1), '-', char::MAX,
']',
Expand Down

0 comments on commit aeac2be

Please sign in to comment.