aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-04-05 11:41:57 +0800
committerRunxi Yu <me@runxiyu.org>2025-04-05 12:28:53 +0800
commitf744d2c52814b685e68438f5382e973db5edaf8c (patch)
tree72501895c1b039e349ead304c88ed4baa9031e7d
parentgit2d: Add license header (diff)
downloadforge-f744d2c52814b685e68438f5382e973db5edaf8c.tar.gz
forge-f744d2c52814b685e68438f5382e973db5edaf8c.tar.zst
forge-f744d2c52814b685e68438f5382e973db5edaf8c.zip
HTML: Broken branches warning
-rw-r--r--templates/repo_branches.tmpl5
-rw-r--r--templates/repo_index.tmpl7
-rw-r--r--templates/repo_log.tmpl7
-rw-r--r--templates/repo_raw_dir.tmpl7
-rw-r--r--templates/repo_tree_dir.tmpl7
-rw-r--r--templates/repo_tree_file.tmpl7
6 files changed, 40 insertions, 0 deletions
diff --git a/templates/repo_branches.tmpl b/templates/repo_branches.tmpl
index fc9592d..55ea0a6 100644
--- a/templates/repo_branches.tmpl
+++ b/templates/repo_branches.tmpl
@@ -44,6 +44,11 @@
</div>
</div>
<div class="padding-wrapper">
+ <p>
+ <strong>
+ Warning: Due to various recent migrations, viewing non-HEAD refs may be broken.
+ </strong>
+ </p>
<table id="branches">
<thead>
<tr class="title-row">
diff --git a/templates/repo_index.tmpl b/templates/repo_index.tmpl
index 21eb5f6..d040f3a 100644
--- a/templates/repo_index.tmpl
+++ b/templates/repo_index.tmpl
@@ -51,6 +51,13 @@
</div>
{{- end -}}
<p class="readingwidth"><code>{{- .ssh_clone_url -}}</code></p>
+ {{- if .ref_name -}}
+ <p class="readingwidth">
+ <strong>
+ Warning: Due to various recent migrations, viewing non-HEAD refs may be broken.
+ </strong>
+ </p>
+ {{- end -}}
{{- if .commits -}}
<div class="commit-list-small">
{{- range .commits -}}
diff --git a/templates/repo_log.tmpl b/templates/repo_log.tmpl
index b334439..2262902 100644
--- a/templates/repo_log.tmpl
+++ b/templates/repo_log.tmpl
@@ -44,6 +44,13 @@
</div>
</div>
<div class="scroll">
+ {{- if .ref_name -}}
+ <p>
+ <strong>
+ Warning: Due to various recent migrations, viewing non-HEAD refs may be broken.
+ </strong>
+ </p>
+ {{- end -}}
<table id="commits" class="wide">
<thead>
<tr class="title-row">
diff --git a/templates/repo_raw_dir.tmpl b/templates/repo_raw_dir.tmpl
index 4072326..a33da4a 100644
--- a/templates/repo_raw_dir.tmpl
+++ b/templates/repo_raw_dir.tmpl
@@ -44,6 +44,13 @@
</div>
</div>
<div class="padding-wrapper scroll">
+ {{- if .ref_name -}}
+ <p>
+ <strong>
+ Warning: Due to various recent migrations, viewing non-HEAD refs may be broken.
+ </strong>
+ </p>
+ {{- end -}}
<table id="file-tree" class="wide">
<thead>
<tr class="title-row">
diff --git a/templates/repo_tree_dir.tmpl b/templates/repo_tree_dir.tmpl
index c528fee..fc06646 100644
--- a/templates/repo_tree_dir.tmpl
+++ b/templates/repo_tree_dir.tmpl
@@ -44,6 +44,13 @@
</div>
</div>
<div class="padding-wrapper scroll">
+ {{- if .ref_name -}}
+ <p>
+ <strong>
+ Warning: Due to various recent migrations, viewing non-HEAD refs may be broken.
+ </strong>
+ </p>
+ {{- end -}}
<table id="file-tree" class="wide">
<thead>
<tr class="title-row">
diff --git a/templates/repo_tree_file.tmpl b/templates/repo_tree_file.tmpl
index 664a5ae..76404a9 100644
--- a/templates/repo_tree_file.tmpl
+++ b/templates/repo_tree_file.tmpl
@@ -45,6 +45,13 @@
</div>
</div>
<div class="padding">
+ {{- if .ref_name -}}
+ <p>
+ <strong>
+ Warning: Due to various recent migrations, viewing non-HEAD refs may be broken.
+ </strong>
+ </p>
+ {{- end -}}
<p>
/{{ .path_spec }} (<a href="/{{ template "group_path_plain" .group_path }}/-/repos/{{ .repo_name }}/raw/{{ .path_spec }}{{- template "ref_query" $root -}}">raw</a>)
</p>