We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 65e41f5 commit 030a32fCopy full SHA for 030a32f
src/main.rs
@@ -23,6 +23,10 @@ struct Args {
23
/// to synchronize itself.
24
#[arg(short = 'i', long, default_value_t = 2.5)]
25
push_retry_interval: f64,
26
+
27
+ /// When set, perform checks but do not actually change the repo state.
28
+ #[arg(short, long)]
29
+ dry_run: bool,
30
}
31
32
fn ensure_tool(sh: &Shell, tool_name: &str) -> Result<()> {
@@ -143,6 +147,11 @@ fn main() -> Result<()> {
143
147
144
148
145
149
150
+ if args.dry_run {
151
+ println!("all checks OK but aborting due to dry run");
152
+ return Ok(());
153
+ }
154
146
155
// ensure that the branch is at the tip of its base for a linear history
156
let base = status.base_ref_name;
157
cmd!(sh, "git fetch").run().context("git fetch")?;
0 commit comments