DESCRIPTION

Show truncated commits when in comparison view


When comparing two resources, the full commit identifier is shown.
This is generally too long (and unnecessary) so truncate this as we
are doing elsewhere.

Make a helper method to return that truncated form so that we can
change the parameterisation if necessary (and/or a preference).
Leave it private in this class until otherwise needed.

Signed-off-by: Blake Oneal xxx@xxx.xxx

COMMENTS

author: Douglas Trujillo
date: 2010-06-20 22:23:41.000000000

Patch Set 1: I would prefer that you didn't submit this

Somehow this doesn't work (or I look in the wrong place):
- modify a tracked file and save it
- "Compare With" > "HEAD revision" -> full SHA1 shown
- Select version in History View and "Compare with Working Tree" -> full SHA1 shown
- Select two versions in History View and "Compare with each other" -> full SHA1 shown

After the header line of your commit message there are 2 blank lines. One would be sufficient.

-------------------------------------
author: Blake Oneal
date: 2010-06-20 23:16:51.000000000

Patch Set 1:

I put the comments in bug 317376 (should have added that to the commit)

https://bugs.eclipse.org/bugs/show_bug.cgi?id=317376

Steps to Reproduce:
open a resource under EGit control
Go to 'history' view
Select two resources
Select 'compare with each other'
Note the title of the compare page is the name of the resource + full commit
reference for the two trees

Perhaps this needs to be changed in multiple places?

-------------------------------------
author: Carlie Harper
date: 2010-06-23 13:14:23.000000000

Patch Set 1: I would prefer that you didn't submit this

- StringIndexOutOfBoundsException when I select "Compare With -> Git Index" in package Explorer. In this case the String "Index" is truncated.

- When I select "Compare with Working Tree" in History View or "Compare With HEAD revision" in package explorer the editor tab contains "Current.." instead of "Current"

Maybe the truncation method should check if the revision String is a SHA-1 or not.

-------------------------------------
author: Blake Oneal
date: 2010-06-25 08:29:20.000000000

Patch Set 1: Abandoned

-------------------------------------
author: Blake Oneal
date: 2010-06-25 08:32:20.000000000

Patch Set 1:

We should certainly check that the string is a long one before truncating. If it were longer than 10 chars that would probably do it.

-------------------------------------
