Skip to content

Commit

Permalink
NotFastForward refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyagr committed May 2, 2024
1 parent fbbc877 commit 25daeb8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cli/src/commands/git.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
),
Expand Down
2 changes: 1 addition & 1 deletion lib/src/git.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>),
Expand Down

0 comments on commit 25daeb8

Please sign in to comment.