forked from mirrors/jj
style: return early from exceptional situation
This commit is contained in:
parent
fc59db5d52
commit
890327ea68
1 changed files with 54 additions and 55 deletions
|
@ -2580,7 +2580,8 @@ don't make any changes, then the operation will be aborted.
|
|||
)?;
|
||||
if &tree_id == commit.tree_id() && interactive {
|
||||
ui.write("Nothing changed.\n")?;
|
||||
} else {
|
||||
return Ok(());
|
||||
}
|
||||
let middle_tree = tx
|
||||
.base_repo()
|
||||
.store()
|
||||
|
@ -2593,8 +2594,7 @@ don't make any changes, then the operation will be aborted.
|
|||
&base_tree,
|
||||
&middle_tree,
|
||||
)?;
|
||||
let first_description =
|
||||
edit_description(tx.base_repo(), &first_template, command.settings())?;
|
||||
let first_description = edit_description(tx.base_repo(), &first_template, command.settings())?;
|
||||
let first_commit = tx
|
||||
.mut_repo()
|
||||
.rewrite_commit(command.settings(), &commit)
|
||||
|
@ -2635,7 +2635,6 @@ don't make any changes, then the operation will be aborted.
|
|||
tx.write_commit_summary(ui.stdout_formatter().as_mut(), &second_commit)?;
|
||||
ui.write("\n")?;
|
||||
tx.finish(ui)?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue