The rebase button should exist as soon as the main repo (or at least
the commit the change derived from) is no longer HEAD. Gerrit will add
the button at that point. But the merge messages may still pop-up on
their own nether-the-less.
The whole thing is a question of mastering your own repo. Gerrit can
only help so far.
regards,
Roland
On Thu, Jan 30, 2014 at 1:28 PM, Evan Huus <eapache@xxxxxxxxx> wrote:
> I believe the simpler answer is that the submit type has been set to "Merge If Necessary" which means if changes are not submitted exactly on top of the change they were authored on, Gerrit will produce a merge automatically.
>
> I expect this was done to reduce rebase conflict when the repo is busy (which can happen) but means that in most cases, we should be rebasing once before submitting to avoid extraneous merges. There should be a "Rebase" button in the UI right next to the submit and cherry pick buttons.
>
> Evan
>
>> On Jan 30, 2014, at 6:25 AM, Roland Knall <rknall@xxxxxxxxx> wrote:
>>
>> Hi
>>
>> I've noticed, that there are now quite a few merge commits in the main
>> wireshark repo:
>>
>> https://code.wireshark.org/review/gitweb?p=wireshark.git;a=history
>>
>> All of them are trivial merges, which means, that local git branches
>> of the developer have been merged by a "git pull" with the global git
>> repo, and then pushed to the main repo, bypassing gerrit in the
>> process.
>>
>> As I have used gerrit for 2 years now in our company, I can say, that
>> those commits happen mostly because the workflow for pulling and
>> pushing changes has not been handled correctly.
>>
>> In general, people tend to work on the master branch and commit on
>> their local master branch. If they pull a patchset for review, this
>> will get merged into the master branch, therefore leading to automatic
>> merge commits by git. With the next push, this will be pushed as
>> "Merge" to gerrit.
>>
>> From my personal experience, we tend to keep the local master branches
>> clean, and allways do all our work in sub-branches. As soon as we need
>> to view a patchset, we can pull it with
>>
>> git fetch <gerrit_repo> refs/changes/xx/xx/x && git checkout -b
>> review_branch FETCH_HEAD
>>
>> into a new branch. This keeps the work branches clean and more
>> importantly the master branch clean as well.
>>
>> The remote branch you push to will allways be determined by the
>> refs/for/* tags. Therefore keeping a lot of local branches won't
>> pollute the online git repo.
>>
>> regards,
>> Roland
>> ___________________________________________________________________________
>> Sent via: Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
>> Archives: http://www.wireshark.org/lists/wireshark-dev
>> Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
>> mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe
> ___________________________________________________________________________
> Sent via: Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
> Archives: http://www.wireshark.org/lists/wireshark-dev
> Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
> mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe