# [EGIT PATCH] Showing abbreviated commit hash of the versions in Compare editor.

9 messages from 2008-01-08 to 2008-01-13. Participants: Roger C. Soares, Robin Rosenberg.
Thread: https://gitlist.dev/t/11516

## Roger C. Soares, 2008-01-08 01:15

Subject: [EGIT PATCH] Showing abbreviated commit hash of the versions in Compare editor.
Message-ID: <200801072315.30122.rogersoares@intelinet.com.br>
URL: https://gitlist.dev/e/200801072315.30122.rogersoares%40intelinet.com.br

```

Signed-off-by: Roger C. Soares <rogersoares@intelinet.com.br>
---
Some more patches, please evaluate.
Don't know what others are working on,
but right now I'm missing a search functionality so
this will probably be my next egit little feature.

cheers

 .../GitCompareFileRevisionEditorInput.java         |   12 ++++++++++++
 .../spearce/egit/ui/internal/GitResourceNode.java  |    5 +++++
 2 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/GitCompareFileRevisionEditorInput.java b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/GitCompareFileRevisionEditorInput.java
index eaba1fa..403fdc1 100644
--- a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/GitCompareFileRevisionEditorInput.java
+++ b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/GitCompareFileRevisionEditorInput.java
@@ -152,6 +152,18 @@ public class GitCompareFileRevisionEditorInput extends CompareEditorInput {
 
 	private void initLabels(ICompareInput input) {
 		CompareConfiguration cc = getCompareConfiguration();
+		if(left != null && left instanceof GitResourceNode) {
+			String ci = ((GitResourceNode)left).getContentIdentifier();
+			if(ci != null) {
+				cc.setLeftLabel(ci.substring(0, 7) + "..");
+			}
+		}
+		if(right != null && right instanceof GitResourceNode) {
+			String ci = ((GitResourceNode)right).getContentIdentifier();
+			if(ci != null) {
+				cc.setRightLabel(ci.substring(0, 7) + "..");
+			}
+		}
 		if (getLeftRevision() != null) {
 			String leftLabel = getFileRevisionLabel(getLeftRevision());
 			cc.setLeftLabel(leftLabel);
diff --git a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/GitResourceNode.java b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/GitResourceNode.java
index e19cef5..f25855a 100644
--- a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/GitResourceNode.java
+++ b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/GitResourceNode.java
@@ -21,6 +21,7 @@ import org.spearce.jgit.lib.TreeEntry;
 public class GitResourceNode extends BufferedContent implements IStructureComparator, ITypedElement {
 	TreeEntry entry;
 	GitResourceNode[] children;
+	String contentIdentifier;
 
 	public GitResourceNode(TreeEntry e) {
 		entry = e;
@@ -28,6 +29,7 @@ public class GitResourceNode extends BufferedContent implements IStructureCompar
 
 	public GitResourceNode(IFileRevision file) {
 		this(file instanceof GitCommitFileRevision ? ((GitCommitFileRevision)file).getTreeEntry() : null);
+		contentIdentifier = ((GitCommitFileRevision)file).getContentIdentifier();
 	}
 
 	public Object[] getChildren() {
@@ -100,5 +102,8 @@ public class GitResourceNode extends BufferedContent implements IStructureCompar
 		}
 	}
 
+	public String getContentIdentifier() {
+		return contentIdentifier;
+	}
 }
 
-- 
1.5.3.7

```

## Robin Rosenberg, 2008-01-08 22:12

Subject: Re: [EGIT PATCH] Showing abbreviated commit hash of the versions in Compare editor.
Message-ID: <200801082312.00329.robin.rosenberg.lists@dewire.com>
URL: https://gitlist.dev/e/200801082312.00329.robin.rosenberg.lists%40dewire.com
In-Reply-To: <200801072315.30122.rogersoares@intelinet.com.br>

```
Thanks.

tisdagen den 8 januari 2008 skrev Roger C. Soares:
> 
> Signed-off-by: Roger C. Soares <rogersoares@intelinet.com.br>
> ---
> Some more patches, please evaluate.
> Don't know what others are working on,
I'm implementing fetch (with some help from Shawn). Progress in
place. I still need to update refs and get in consistent with native
git behaviour.

I'm also updating the javadocs.

> but right now I'm missing a search functionality so
> this will probably be my next egit little feature.
Sounds good.

-- robin

```

## Roger C. Soares, 2008-01-09 01:33

Subject: Re: [EGIT PATCH] Showing abbreviated commit hash of the versions in Compare editor.
Message-ID: <4784247B.10604@intelinet.com.br>
URL: https://gitlist.dev/e/4784247B.10604%40intelinet.com.br
In-Reply-To: <200801082312.00329.robin.rosenberg.lists@dewire.com>

```
Robin Rosenberg escreveu:
> I'm implementing fetch (with some help from Shawn). Progress in
> place. I still need to update refs and get in consistent with native
> git behaviour.
>
> I'm also updating the javadocs.
Cool.

I use a lot the eclipse feature that highlights all occurences of a 
variable or method but with all the warnings in the project it is 
difficult to visually find these occurences. So I'm anxious to remove a 
lot of warnings. Public methods without documentation are one of them. 
Is it ok if I send you a patch removing all the warnings I know how but 
the ones about public methods needing documentation as you're already 
documenting them? I also want to remove the auto generated TODOs, as 
they don't actually say what to do, like this one:
// TODO Auto-generated catch block

[]s,
Roger.

```

## Robin Rosenberg, 2008-01-10 23:46

Subject: Re: [EGIT PATCH] Showing abbreviated commit hash of the versions in Compare editor.
Message-ID: <200801110046.41786.robin.rosenberg.lists@dewire.com>
URL: https://gitlist.dev/e/200801110046.41786.robin.rosenberg.lists%40dewire.com
In-Reply-To: <4784247B.10604@intelinet.com.br>

```
onsdagen den 9 januari 2008 skrev Roger C. Soares:
> Robin Rosenberg escreveu:
> > I'm implementing fetch (with some help from Shawn). Progress in
> > place. I still need to update refs and get in consistent with native
> > git behaviour.
> >
> > I'm also updating the javadocs.
> Cool.
> 
> I use a lot the eclipse feature that highlights all occurences of a 
> variable or method but with all the warnings in the project it is 
> difficult to visually find these occurences. So I'm anxious to remove a 
> lot of warnings. Public methods without documentation are one of them. 
> Is it ok if I send you a patch removing all the warnings I know how but 
> the ones about public methods needing documentation as you're already 
> documenting them? I also want to remove the auto generated TODOs, as 
> they don't actually say what to do, like this one:
> // TODO Auto-generated catch block

I pushed my doc-branch as pu, you can look at it. My intention is take a look again
and then push it as master if there are no objections. Is it ok and good to flags 
public stuff without javadoc as an error (tip pu commit)?

The abbr commit patch is already pushed to master.

-- robin

```

## Roger C. Soares, 2008-01-12 03:02

Subject: Re: [EGIT PATCH] Showing abbreviated commit hash of the versions in Compare editor.
Message-ID: <47882DBB.2000308@intelinet.com.br>
URL: https://gitlist.dev/e/47882DBB.2000308%40intelinet.com.br
In-Reply-To: <200801110046.41786.robin.rosenberg.lists@dewire.com>

```

Robin Rosenberg escreveu:
> I pushed my doc-branch as pu, you can look at it. My intention is take a look again
> and then push it as master if there are no objections. Is it ok and good to flags 
> public stuff without javadoc as an error (tip pu commit)?
>
> The abbr commit patch is already pushed to master.
>   
Looks good to me. You actually took some time to explain things, it will 
be usefull, thanks!
If we really want to document all the public methods then I think it's 
nice to flag it's absence as an error. It would have made me document 
GitResourceNode.getContentIdentifier(), it's now one more comment for 
you to add before pushing to master ;)

[]s,
Roger.

```

## Roger C. Soares, 2008-01-12 03:37

Subject: Re: [EGIT PATCH] Showing abbreviated commit hash of the versions in Compare editor.
Message-ID: <47883600.20307@intelinet.com.br>
URL: https://gitlist.dev/e/47883600.20307%40intelinet.com.br
In-Reply-To: <200801110046.41786.robin.rosenberg.lists@dewire.com>

```


Robin Rosenberg escreveu:
> I pushed my doc-branch as pu, you can look at it. My intention is take a look again
> and then push it as master if there are no objections. Is it ok and good to flags 
> public stuff without javadoc as an error (tip pu commit)?
>   
Got some errors, when trying to export to a deployable plugin:
"/home/roger/eclipse/workspace/egit/org.spearce.jgit/tst" does not exist!

And on "team -> share project... -> Git", it goes to the CVS wizard.

[]s,
Roger.

```

## Robin Rosenberg, 2008-01-12 15:44

Subject: Re: [EGIT PATCH] Showing abbreviated commit hash of the versions in Compare editor.
Message-ID: <200801121644.21173.robin.rosenberg.lists@dewire.com>
URL: https://gitlist.dev/e/200801121644.21173.robin.rosenberg.lists%40dewire.com
In-Reply-To: <47883600.20307@intelinet.com.br>

```
lördagen den 12 januari 2008 skrev Roger C. Soares:
> 
> Robin Rosenberg escreveu:
> > I pushed my doc-branch as pu, you can look at it. My intention is take a look again
> > and then push it as master if there are no objections. Is it ok and good to flags 
> > public stuff without javadoc as an error (tip pu commit)?
> >   
> Got some errors, when trying to export to a deployable plugin:
> "/home/roger/eclipse/workspace/egit/org.spearce.jgit/tst" does not exist!
> 
> And on "team -> share project... -> Git", it goes to the CVS wizard.

Due to my lack of testing @_@. I pushed a new pu branch with these two errors fixed.

Thanks
-- robin

```

## Roger C. Soares, 2008-01-13 21:02

Subject: Re: [EGIT PATCH] Showing abbreviated commit hash of the versions in Compare editor.
Message-ID: <478A7C48.6040501@intelinet.com.br>
URL: https://gitlist.dev/e/478A7C48.6040501%40intelinet.com.br
In-Reply-To: <200801121644.21173.robin.rosenberg.lists@dewire.com>

```
Hi Robin,

For what I've been using it's all working now.
I saw some typos if you want to update them while you're at it:

Activator.java
     * Instatiate an error exception.
     * Log a dbeug message
GitHistoryPage.java
     * @return reformated comment
     * This class extendes the build in history page with Git features, such

[]s,
Roger.

--
Robin Rosenberg escreveu:
> lördagen den 12 januari 2008 skrev Roger C. Soares:
>   
>> Robin Rosenberg escreveu:
>>     
>>> I pushed my doc-branch as pu, you can look at it. My intention is take a look again
>>> and then push it as master if there are no objections. Is it ok and good to flags 
>>> public stuff without javadoc as an error (tip pu commit)?
>>>   
>>>       
>> Got some errors, when trying to export to a deployable plugin:
>> "/home/roger/eclipse/workspace/egit/org.spearce.jgit/tst" does not exist!
>>
>> And on "team -> share project... -> Git", it goes to the CVS wizard.
>>     
>
> Due to my lack of testing @_@. I pushed a new pu branch with these two errors fixed.
>
> Thanks
> -- robin
>
>
>
>   

```

## Robin Rosenberg, 2008-01-13 23:54

Subject: Re: javadoc (was [EGIT PATCH] Showing abbreviated commit hash of the versions in Compare editor.)
Message-ID: <200801140054.09956.robin.rosenberg.lists@dewire.com>
URL: https://gitlist.dev/e/200801140054.09956.robin.rosenberg.lists%40dewire.com
In-Reply-To: <478A7C48.6040501@intelinet.com.br>

```
söndagen den 13 januari 2008 skrev Roger C. Soares:
> Hi Robin,
> 
> For what I've been using it's all working now.
> I saw some typos if you want to update them while you're at it:

Fixed, on pu now. Will push to master tomorrow.

-- robiin

```
