From bf217da41b429d80da49287b84dadcbf499ac22c Mon Sep 17 00:00:00 2001
From: GitLab Bot <gitlab-bot@gitlab.com>
Date: Thu, 11 Feb 2021 21:09:00 +0000
Subject: Add latest changes from gitlab-org/gitlab@master

---
 app/assets/javascripts/vue_shared/components/commit.vue | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

(limited to 'app/assets/javascripts/vue_shared/components/commit.vue')

diff --git a/app/assets/javascripts/vue_shared/components/commit.vue b/app/assets/javascripts/vue_shared/components/commit.vue
index deca934e283..27f136059fa 100644
--- a/app/assets/javascripts/vue_shared/components/commit.vue
+++ b/app/assets/javascripts/vue_shared/components/commit.vue
@@ -133,6 +133,9 @@ export default {
         ? sprintf(__("%{username}'s avatar"), { username: this.author.username })
         : null;
     },
+    refUrl() {
+      return this.commitRef.ref_url || this.commitRef.path;
+    },
   },
 };
 </script>
@@ -156,9 +159,10 @@ export default {
       <gl-link
         v-else
         v-gl-tooltip
-        :href="commitRef.ref_url"
+        :href="refUrl"
         :title="commitRef.name"
         class="ref-name"
+        data-testid="ref-name"
         >{{ commitRef.name }}</gl-link
       >
     </template>
-- 
cgit v1.2.1

