[OCaml] Mobile-friendly clone of cgit.
refactor use Resolvers.default_repo_description in layout
Replace the hardcoded "Unnamed repository" prefix check with an exact comparison against the canonical constant, so the two can never drift apart.
lib/views/layout.ml
@@ -40,8 +40,7 @@
40
40
(* A freshly initialised repository carries git's placeholder description; treat
41
41
it as no description at all rather than showing boilerplate. *)
42
42
let meaningful_subtitle subtitle =
43
Removed:
if String.starts_with ~prefix:"Unnamed repository" subtitle then ""
44
Removed:
else subtitle
43
Added:
if subtitle = Resolvers.default_repo_description then "" else subtitle
45
44
46
45
(** Inside a repository only the description is shown, since the navigation
47
46
already names the repository. Elsewhere the site identifies itself. *)