I need to discuss this strange event to understand where to go next. I am not sure if this is a Gerrit bug or a Git bug yet, but it caused a branch in Gerrit to not update to the new commit.Gerrit 2.16.15Git: 2.19.1.windows.1 and 2.24.1.windows.2Master: c1--c2--c3Branch1: c1--c2--c3--c4--c5--c6--c71. The user merged Branch1 into Master locally,
and Git showed about 100 lines of creates/deletes/renames, but then git status shows "nothing to commit, working tree clean."2. So they decided to use "git commit --allow-empty" and then push that to Gerrit for review.3. The code review showed the parent as Branch1 only and a commit message describing the merge.4. User self approves the votes and submits.5. Gerrit shows status as merged. Gerrit auto added the comment: "Marking change merged without cherry-picking to branch, as the resulting commit would be empty."The git history doesn't seem to reflect any changes when cloning again. Git Log shows the same commits from before the merge for each branch. There is no error in the error_log. I am unable to reach the commit listed in the code review after cloning. I am able to reach the commit if I clone directly from Gerrit's file system. It seems to be an orphan commit.I was able to reproduce this situation with two other branches in a test environment.This doesn't seem like expected behavior to me for Git and Gerrit. What do you think? Why did Git behave like that with the merge? Why does Gerrit not offer the most recent commit?And while troubleshooting, the merge can be done locally again because Gerrit is not advertising the merge commit. When locally merging Branch1 into Master, Git will now say that I am 4 commits ahead of origin/Master, but it still says "nothing to commit, working tree clean."
--
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/d18d8846-8de3-44bd-a721-b4d8b361add8%40googlegroups.com.
On Sat, 7 Mar 2020, 08:10 Doug Luedtke, <douglas...@gmail.com> wrote:I need to discuss this strange event to understand where to go next. I am not sure if this is a Gerrit bug or a Git bug yet, but it caused a branch in Gerrit to not update to the new commit.Gerrit 2.16.15Git: 2.19.1.windows.1 and 2.24.1.windows.2Master: c1--c2--c3Branch1: c1--c2--c3--c4--c5--c6--c71. The user merged Branch1 into Master locally,In this situation it's a fast-forward from c3 to c7 so there is no merge commit created.If you want to get the contents of branch1 into master you will need to either push it directly, or create an explicit merge commit by using the --no-ff option on the git merge command.
[2020-03-06 10:28:22,343] [ReceiveCommits-109] WARN com.google.gerrit.server.git.receive.ReceiveCommits : Skipping change updates on something/something/something/something-something because ref update failed: REJECTED_OTHER_REASON no new changes [CONTEXT RECEIVE_ID="something/something/something/something-something-15XXXXXXXXXXXXXX35-5bXXXXX29" ]
Nevermind the issue in my last comment. The --no-ff worked as expected. I looked too quickly at the status, it wasn't submitted yet. Now the master branch is updated as expected.
I hope everyone enjoyed their Monday entertainment. I'm here all week. Don't forget to tip your Admins and Devs.