My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 2783: Related changes not shown correctly for commits of other branch
1 person starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----


Sign in to add a comment
 
Reported by Martin.W...@gmail.com, Jul 18, 2014

Affected Version:
2.9-rc1

What steps will reproduce the problem?
1. push commits to a branch (no commit has a Change-ID,
   they are imported from a different system.
2. Merge this branch to Master (with Change-ID in the merge commit)
3. Look at related changes in the Gerrit Web UI


What is the expected output? What do you see instead?

All changes in the related changes list should show the one-line description of the commit.
Instead, I only see the description for real changes (those with Commit-ID, pushed to refs/for/master).
Changes merged from the other branch correctly show the black dot, but they do not contain any text.

This also messes up the list layout -- the empty rows are drawn a little bit narrower,
but the scroll logic does not take that into account:
when scrolling down (e.g. via J), the list scrolls faster than the selection,
and the selection bar slowly moves out of the display area.

For merges of many commits, it would also be good to restrict the related changes list
to the first parent, or to be able to expand/collapse individual changes.



Please provide any additional information below.

The history looks something like this:

 f/M C
  O  :
  |  |
  O  o
  |\ |
  | \|
  o  O
  |  |
  o  O
  |\ |
  M \|
     o
     |
     o

Branch C is not managed by Gerrit, just pushed to its own branch in Gerrits repo.
The master branch was created in Gerrit and is managed by Gerrit
(i.e. only commits with Change-IDs, no direct push to master).
No Change is currently merged, even the first merge commit is still in review.

M is the current master, f/M are commits pushed to refs/for/master.
C is the other branch (with separate root)
big O's show which part can be seen in the screenshot.
The bigger O's 
gerrit-related-changes-issue.png
6.7 KB   View   Download
Nov 20, 2014
#1 Martin.W...@gmail.com
This is caused by two bugs/problems:

* my import script prepended an extra newline to each commit message
* all git commands ignore this newline, but Gerrit does not

So the question is: how should a broken commit with such an extra newline be handled?
Just like 'git log', which simply strips heading/trailing newlines?
Or like before, displaying an empty summary?

I propose to stay in sync with normal Git:
Either make Gerrit ignore this newline, too.
Or alternatively go to Git people and make them warn/barf on extra newlines.
Sign in to add a comment

Powered by Google Project Hosting