DESCRIPTION

Update equals() and hashCode() in GitModelCommit

Bug: 323201
Change-Id: I3ca7cc79ea47f9a735d7be57d99a4776dc1d4489
Signed-off-by: Leslie Stephenson xxx@xxx.xxx


COMMENTS

author: Leslie Stephenson
date: 2010-08-20 18:46:30.000000000

Uploaded patch set 2.

-------------------------------------
author: Jaylon Avila
date: 2010-08-20 19:17:48.000000000

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

(1 inline comment)

hashCode() seems okay but equals(Object) looks incorrect to me.

Also, why is 'ancestorCommit' being ignored? As a third party reading the code, I would expect it to be considered. If there is a reason why it is ignored, please inline comments into the two methods.

Line:170, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/synchronize/model/GitModelCommit.java -> This seems off. If the other model's base commit is 'null', we only check if we ourselves has a base commit is 'null'? The locations and/or remote commits of the two models may still differ from each other, no?

The location, remote commit, and base commit are all taken consideration in the hashCode() implementation so it seems to me that all three should also should be factored into the implementation of equals(Object).

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