From 50db965daf710908e1d8f4371e88db9cc9dede78 Mon Sep 17 00:00:00 2001 From: James Sully Date: Sat, 22 Jun 2024 17:36:01 +1000 Subject: [PATCH] remote set-url: remove redundant transaction --- cli/src/commands/git/remote/set_url.rs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/cli/src/commands/git/remote/set_url.rs b/cli/src/commands/git/remote/set_url.rs index 86363fdb2e..d4567b0a6e 100644 --- a/cli/src/commands/git/remote/set_url.rs +++ b/cli/src/commands/git/remote/set_url.rs @@ -34,17 +34,9 @@ pub fn cmd_remote_set_url( command: &CommandHelper, args: &SetUrlArgs, ) -> Result<(), CommandError> { - let mut workspace_command = command.workspace_helper(ui)?; + let workspace_command = command.workspace_helper(ui)?; let repo = workspace_command.repo(); let git_repo = get_git_repo(repo.store())?; - let mut tx = workspace_command.start_transaction(); git::remote_set_url(&git_repo, &args.remote, &args.url)?; - if tx.mut_repo().has_changes() { - tx.finish( - ui, - format!("set url of git remote {} to {}", &args.remote, &args.url), - ) - } else { - Ok(()) // Do not print "Nothing changed." - } + Ok(()) }