You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 11, 2020. It is now read-only.
worktree.go has a dedicated ErrNonFastForwardUpdate error which should be used instead.
The main issue is that these two bits of code work differently:
err:=w.PullContext(ctx, options) // might return a git.ErrNonFastForwardUpdateiferr!=nil&&err==git.ErrNonFastForwardUpdate {
// this code might get executed
}
err:=r.PushContext(ctx, options) // might return result of fmt.Errorf("non-fast-forward update: %s", cmd.Name.String())iferr!=nil&&err==git.ErrNonFastForwardUpdate {
// this code can never get executed
}
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Right now, non fast-forward errors during remote pushes create a new error which includes the git reference :
go-git/remote.go
Line 793 in d6c4b11
worktree.go
has a dedicatedErrNonFastForwardUpdate
error which should be used instead.The main issue is that these two bits of code work differently:
The text was updated successfully, but these errors were encountered: