summaryrefslogtreecommitdiff
path: root/lib/gitlab/git/branch.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/git/branch.rb')
-rw-r--r--lib/gitlab/git/branch.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/gitlab/git/branch.rb b/lib/gitlab/git/branch.rb
index 9447cfa0fb6..fbe52db9c0b 100644
--- a/lib/gitlab/git/branch.rb
+++ b/lib/gitlab/git/branch.rb
@@ -28,6 +28,10 @@ module Gitlab
def state
active? ? :active : :stale
end
+
+ def cache_key
+ "branch:" + Digest::SHA1.hexdigest([name, target, dereferenced_target&.sha].join(':'))
+ end
end
end
end