diff --git a/src/main.rs b/src/main.rs index b0f14c719eae6ad42ebf9be5717da50518eae9dd..e74dec2618c8d2f4c179fe162d5df2177569e2e1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1351,6 +1351,11 @@ fn rebase(repo: &Repository, m: &ArgMatches) -> Result<()> { }; let newbase = onto.unwrap_or(base.id()); + if newbase == base.id() && !interactive { + println!("Nothing to do: base unchanged and not rebasing interactively"); + return Ok(()); + } + let (base_short, _) = try!(commit_summarize_components(&repo, base.id())); let (newbase_short, _) = try!(commit_summarize_components(&repo, newbase)); let (series_short, _) = try!(commit_summarize_components(&repo, series.id()));