summaryrefslogtreecommitdiff
path: root/app/models/repository.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/repository.rb')
-rw-r--r--app/models/repository.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb
index fff6d4be275..a77fa8f2ce7 100644
--- a/app/models/repository.rb
+++ b/app/models/repository.rb
@@ -69,7 +69,13 @@ class Repository
end
def ==(other)
- @disk_path == other.disk_path
+ other.is_a?(self.class) && @disk_path == other.disk_path
+ end
+
+ alias_method :eql?, :==
+
+ def hash
+ [self.class, @disk_path].hash
end
def raw_repository