From ceeef2830020d1553aefd1107956e749c416c492 Mon Sep 17 00:00:00 2001 From: Ilya Grigoriev Date: Thu, 11 Apr 2024 17:32:34 -0700 Subject: [PATCH] NotFastForward refactor --- cli/src/commands/git.rs | 2 +- lib/src/git.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/src/commands/git.rs b/cli/src/commands/git.rs index 9122399631..c7c27f03ee 100644 --- a/cli/src/commands/git.rs +++ b/cli/src/commands/git.rs @@ -1015,7 +1015,7 @@ fn cmd_git_push( .map_err(|err| match err { GitPushError::InternalGitError(err) => map_git_error(err), GitPushError::NotFastForward => user_error_with_hint( - "The push conflicts with changes made on the remote (it is not fast-forwardable).", + err.to_string(), "Try fetching from the remote, then make the branch point to where you want it to be, \ and push again.", ), diff --git a/lib/src/git.rs b/lib/src/git.rs index 03df6cf200..b8847ca7ca 100644 --- a/lib/src/git.rs +++ b/lib/src/git.rs @@ -1208,7 +1208,7 @@ pub enum GitPushError { name = REMOTE_NAME_FOR_LOCAL_GIT_REPO )] RemoteReservedForLocalGitRepo, - #[error("Push is not fast-forwardable")] + #[error("The push conflicts with changes made on the remote (it is not fast-forwardable).")] NotFastForward, #[error("Remote rejected the update of some refs (do you have permission to push to {0:?}?)")] RefUpdateRejected(Vec),