Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2022-01-26 04:00:03 +0300
committerStan Hu <stanhu@gmail.com>2022-01-26 04:02:33 +0300
commit12d9366e0178d70eca089914498f2e1d6ab745f2 (patch)
treec7e49be2e74c85e4d2a2616882ea5fc390a14d5e
parent36056bb21ed8956f4c8e54d3e307ce250db92e48 (diff)
operations: Allow rebase to work if patch has already been appliedsh-skip-empty-commits-rebase
Recently it appears there has been an uptick of rebase failures due to "this patch has already been applied" errors. If a target branch contains changes that are already in the source branch, and a user rebases, this failure would cause the rebase to stop. We now skip these empty commits and allow the rebase to continue. This is already with squash. Relates to https://gitlab.com/gitlab-org/gitlab/-/issues/351017 Changelog: fixed
-rw-r--r--internal/gitaly/service/operations/rebase.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/internal/gitaly/service/operations/rebase.go b/internal/gitaly/service/operations/rebase.go
index 66d3ac360..f3dcc7b2a 100644
--- a/internal/gitaly/service/operations/rebase.go
+++ b/internal/gitaly/service/operations/rebase.go
@@ -64,6 +64,7 @@ func (s *Server) UserRebaseConfirmable(stream gitalypb.OperationService_UserReba
Committer: committer,
BranchName: string(header.Branch),
UpstreamRevision: startRevision.String(),
+ SkipEmptyCommits: true,
})
if err != nil {
return stream.Send(&gitalypb.UserRebaseConfirmableResponse{