My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 245: Request improvement in side-by-side lineup
  Back to list
Status:  Released
Owner:  ----
Closed:  Oct 2012
Cc:  stadlera...@gmail.com


Sign in to add a comment
 
Reported by code-rev...@gtempaccount.com, Sep 24, 2009
Reported by Andrew D. Stadler (Google) <stadler@android.com> on Fri Jul 17 11:53:58 PDT 2009
Source: JIRA GERRIT-246

Take a look at this CL:
<https://android-git.corp.google.com/g/Gerrit#patch,sidebyside,7661,3,src/com/
android/email/activity/MessageCompose.java>

Scroll down to processSourceMessage()

This is essentially a complete rewrite of this method - You'll note as you
scroll down that almost no lines at all are equal.

What's annoying is that, because of a few straggling equal lines, it seems to
have spread out the "new" code so you have to scroll up and down to actually
read it and analyze it.

I know this is all heuristics but is there any way to turn down the threshold
for complete replacement, so it will just say, screw it, this is new code, and
put the new code in a single block?
Sep 24, 2009
#1 code-rev...@gtempaccount.com
Comment by Shawn Pearce <sop@google.com> on Fri Jul 17 13:09:17 PDT 2009

Yuck, that was ugly.

There isn't a tuneable for this.  Gerrit is showing exactly the patch Git
produces.  Tuning Git in this case may make other corner cases worse.  Its not
likely to be easily done.  We may just have to bite the bullet here and say
that in a side-by-side view if the hunks are really close (within 1 or 2 lines
of each other) and are really large on either side of the context line, to
merge them and treat the context line as a replacement.
Sep 24, 2009
#2 sop+code@google.com
(No comment was entered for this change.)
Status: Accepted
Owner: ---
Sep 24, 2009
#3 sop+code@google.com
(No comment was entered for this change.)
Cc: stad...@android.com
Mar 2, 2010
#4 sop@google.com
Massively improved by Ie9f4210c2618ac0859e1087c54bd65bc4595495a,
but its still pretty ugly.

I think we're doing about as best as can be expected at this
point.  Going further risks screwing up other cases even worse.
Status: Fixed
Labels: FixedIn-2.1.2
Oct 25, 2012
#5 sop@google.com
(No comment was entered for this change.)
Status: Released
Sign in to add a comment

Powered by Google Project Hosting