Prevent creating new merge commit when submiting merge commit with 'Rebase if Necessary' submit strategy

60 views
Skip to first unread message

UkJung Kim

unread,
Jun 27, 2017, 6:55:55 AM6/27/17
to Repo and Gerrit Discussion
Hello,

We have been using 'Rebase if Necessary' for submit strategy, so that we can track all commits in gerrit review.
But I find that it fall back to 'Merge if Necessary' for merge commit.
'Merge if Necessary' create new merge commit that cannot be tracked in gerrit review.

So, is there any way to prevent for gerrit to create new merge commit even when the 'Rebase if Necessary' strategy is using?
If we cannot use 'Rebase if Necessary' for merge commit, I'd like to prevent submitting merge commit when rebasing or merging is required.

David Pursehouse

unread,
Jun 27, 2017, 7:11:49 AM6/27/17
to UkJung Kim, Repo and Gerrit Discussion
On Tue, Jun 27, 2017 at 7:55 PM UkJung Kim <nere...@gmail.com> wrote:
Hello,

We have been using 'Rebase if Necessary' for submit strategy, so that we can track all commits in gerrit review.
But I find that it fall back to 'Merge if Necessary' for merge commit.
'Merge if Necessary' create new merge commit that cannot be tracked in gerrit review.


This is a known issue, and the following patch was proposed:


 
So, is there any way to prevent for gerrit to create new merge commit even when the 'Rebase if Necessary' strategy is using?
If we cannot use 'Rebase if Necessary' for merge commit, I'd like to prevent submitting merge commit when rebasing or merging is required.

--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Marcelo Ávila de Oliveira

unread,
Jun 27, 2017, 7:52:46 AM6/27/17
to David Pursehouse, UkJung Kim, Repo and Gerrit Discussion
2017-06-27 8:11 GMT-03:00 David Pursehouse <david.pu...@gmail.com>:
On Tue, Jun 27, 2017 at 7:55 PM UkJung Kim <nere...@gmail.com> wrote:
Hello,

We have been using 'Rebase if Necessary' for submit strategy, so that we can track all commits in gerrit review.
But I find that it fall back to 'Merge if Necessary' for merge commit.
'Merge if Necessary' create new merge commit that cannot be tracked in gerrit review.


This is a known issue, and the following patch was proposed:



 Is this related to this issue?

UkJung Kim

unread,
Jun 27, 2017, 8:26:06 AM6/27/17
to Repo and Gerrit Discussion, david.pu...@gmail.com, nere...@gmail.com

2017년 6월 27일 화요일 오후 8시 52분 46초 UTC+9, Marcelo Ávila de Oliveira 님의 말:
Yes, it is.
And also related to this. Our CI is losing merge event for newly created merge commit.

Rajesh M

unread,
Oct 16, 2017, 11:22:43 AM10/16/17
to Repo and Gerrit Discussion


On Tuesday, 27 June 2017 16:41:49 UTC+5:30, David Pursehouse wrote:
On Tue, Jun 27, 2017 at 7:55 PM UkJung Kim <nere...@gmail.com> wrote:
Hello,

We have been using 'Rebase if Necessary' for submit strategy, so that we can track all commits in gerrit review.
But I find that it fall back to 'Merge if Necessary' for merge commit.
'Merge if Necessary' create new merge commit that cannot be tracked in gerrit review.


This is a known issue, and the following patch was proposed:

This change is abandoned. Any idea to implement this in future ? 

Andreas Lederer

unread,
Aug 8, 2018, 7:24:48 AM8/8/18
to Repo and Gerrit Discussion
Hi David,

we are also using "Rebase if Necessary". We would like to force, that merges are only fast forwarded during submit, maybe with a project option to enable this behavior.
Currently it is not visible in the gerrit ui, that there was a merge-merge in the background, we recognized it only later on client side by viewing the history.

In our case it would be sufficient, that we get a kind of "cannot submit", so that the developer needs to provide a new patch set for the merge to solve the issue.

It seems this change (76670) is abandoned, is there any plan to implement it or a similar solution ?

Thanks,
Andreas
Reply all
Reply to author
Forward
0 new messages