[OCaml] Mobile-friendly clone of cgit.
chore remove emacs prop lines from all project files
Strip -*- mode: tuareg -*- and -*- mode: lisp -*- lines from all .ml, .mli, and dune files. Also remove the Local Variables block from dune-project. The emacs modeline detection *code* in syntax.ml is preserved (it detects other people's mode lines, it doesn't declare one itself).
Changed files
- bin/config_writer.ml
- bin/dune
- bin/main.ml
- dune-project
- lib/config.ml
- lib/dune
- lib/handlers.ml
- lib/highlight.ml
- lib/highlight_grammars.ml
- lib/line_diff.ml
- lib/list_ext.ml
- lib/main.ml
- lib/resolvers.ml
- lib/resolvers.mli
- lib/routes.ml
- lib/static_handler.ml
- lib/syntax.ml
- lib/views.ml
- lib/views/components.ml
- lib/views/error.ml
- lib/views/layout.ml
- lib/views/repo.ml
- lib/views/root.ml
- lib/views/time_format.ml
- lib/views/ui.ml
- lib/views/ui.mli
- test/test_commit_parsing.ml
- test/test_config.ml
- test/test_diff.ml
- test/test_discovery.ml
- test/test_dispatch.ml
- test/test_helpers.ml
- test/test_list_ext.ml
- test/test_ogit.ml
- test/test_router.ml
- test/test_tree_paths.ml
- test/test_validation.ml
- test/test_views.ml
bin/config_writer.ml
@@ -1,5 +1,3 @@
1
Removed:
(* -*- mode: tuareg; -*- *)
2
Removed:
3
1
(** The [ogit-write-config] executable.
4
2
5
3
Writes a configuration file containing every variable at its default value,
bin/dune
@@ -1,5 +1,3 @@
1
Removed:
;;; -*- mode: lisp; -*-
2
Removed:
3
1
(executables
4
2
(names main config_writer)
5
3
(public_names ogit ogit-write-config)
bin/main.ml
@@ -1,5 +1,3 @@
1
Removed:
(* -*- mode: tuareg; -*- *)
2
Removed:
3
1
(** The [ogit] executable.
4
2
5
3
Parses arguments and delegates to {!Ogit.Main.run}. [--git-project-root]
dune-project
@@ -31,7 +31,3 @@
31
31
(yojson (>= 2.0.0)))
32
32
(tags
33
33
(git "web interface")))
34
Removed:
35
Removed:
;; Local Variables:
36
Removed:
;; mode: lisp
37
Removed:
;; End:
lib/config.ml
@@ -1,6 +1,3 @@
1
Removed:
(* -*- mode: tuareg; -*- *)
2
Removed:
(* -*- mode: tuareg; -*- *)
3
Removed:
4
1
(** Reading and validating the TOML configuration.
5
2
6
3
The file is looked up at [$OGIT_CONFIG], then
lib/dune
@@ -1,5 +1,3 @@
1
Removed:
;; -*- mode: lisp; -*-
2
Removed:
3
1
(include_subdirs unqualified)
4
2
5
3
(library
lib/handlers.ml
@@ -1,6 +1,3 @@
1
Removed:
(* -*- mode: tuareg; -*- *)
2
Removed:
(* -*- mode: tuareg; -*- *)
3
Removed:
4
1
(** Request handlers: the seam between Git data and rendered pages.
5
2
6
3
Each handler opens exactly one repository context, reads what its page
lib/highlight.ml
@@ -1,5 +1,3 @@
1
Removed:
(* -*- mode: tuareg; -*- *)
2
Removed:
3
1
(** Server-side syntax highlighting engine.
4
2
5
3
Tokenizes source code using TextMate grammars (via hilite) and produces
lib/highlight_grammars.ml
@@ -1,5 +1,3 @@
1
Removed:
(* -*- mode: tuareg; -*- *)
2
Removed:
3
1
(** Registry of bundled TextMate grammars for syntax highlighting.
4
2
5
3
Loads grammars embedded at build time via [ocaml-crunch] and registers them
lib/line_diff.ml
@@ -1,5 +1,3 @@
1
Removed:
(* -*- mode: neocaml; -*- *)
2
Removed:
3
1
(** Line-oriented diffs between two blobs.
4
2
5
3
Computes a longest-common-subsequence diff and groups the result into hunks
lib/list_ext.ml
@@ -1,5 +1,3 @@
1
Removed:
(* -*- mode: tuareg; -*- *)
2
Removed:
3
1
(** List utilities not in the OCaml 5.2 stdlib. *)
4
2
5
3
let rec take n = function
lib/main.ml
@@ -1,5 +1,3 @@
1
Removed:
(* -*- mode: tuareg; -*- *)
2
Removed:
3
1
(** Server startup.
4
2
5
3
Loads configuration, then hands the resulting routes to Dream. Startup fails
lib/resolvers.ml
@@ -1,5 +1,3 @@
1
Removed:
(* -*- mode: tuareg; -*- *)
2
Removed:
3
1
module Store = Git_unix.Store
4
2
open Lwt_result.Syntax
5
3
lib/resolvers.mli
@@ -1,5 +1,3 @@
1
Removed:
(* -*- mode: tuareg; -*- *)
2
Removed:
3
1
(** Git data access layer. *)
4
2
5
3
module Store = Git_unix.Store
lib/routes.ml
@@ -1,5 +1,3 @@
1
Removed:
(* -*- mode: tuareg; -*- *)
2
Removed:
3
1
(** URL paths, in both directions.
4
2
5
3
One {!t} value describes a page, and the same value both generates a link
lib/static_handler.ml
@@ -1,5 +1,3 @@
1
Removed:
(* -*- mode: tuareg; -*- *)
2
Removed:
3
1
(** Serving the static assets embedded at build time.
4
2
5
3
Assets are compiled into the executable by [ocaml-crunch] (see the rule in
lib/syntax.ml
@@ -1,5 +1,3 @@
1
Removed:
(* -*- mode: tuareg; -*- *)
2
Removed:
3
1
(** Guessing a file's language for syntax highlighting.
4
2
5
3
Detection is best-effort and purely advisory: the blob renders identically
lib/views.ml
@@ -1,5 +1,3 @@
1
Removed:
(* -*- mode: tuareg; -*- *)
2
Removed:
3
1
(** View layer — re-exports layout and page modules. *)
4
2
5
3
let error_page = Error.render
lib/views/components.ml
@@ -1,5 +1,3 @@
1
Removed:
(* -*- mode: tuareg; -*- *)
2
Removed:
3
1
(** Ogit's vocabulary of page parts.
4
2
5
3
Where {!Ui} supplies generic building blocks, this module names the parts
lib/views/error.ml
@@ -1,5 +1,3 @@
1
Removed:
(* -*- mode: tuareg; -*- *)
2
Removed:
3
1
(** Error pages.
4
2
5
3
These are deliberately self-contained rather than going through {!Layout}:
lib/views/layout.ml
@@ -1,5 +1,3 @@
1
Removed:
(* -*- mode: tuareg; -*- *)
2
Removed:
3
1
(** The page shell: everything that surrounds a page's own content.
4
2
5
3
Pages hand this module a {!body_data} description and receive a complete
lib/views/repo.ml
@@ -1,5 +1,3 @@
1
Removed:
(* -*- mode: tuareg; -*- *)
2
Removed:
3
1
(** The repository pages: summary, commit list, file tree, blob, commit detail,
4
2
branches and tags.
5
3
lib/views/root.ml
@@ -1,5 +1,3 @@
1
Removed:
(* -*- mode: tuareg; -*- *)
2
Removed:
3
1
(** The repository list, and the project directory pages that share its shape.
4
2
5
3
A project directory is the same page scoped to a subtree, so both are
lib/views/time_format.ml
@@ -1,5 +1,3 @@
1
Removed:
(* -*- mode: tuareg; -*- *)
2
Removed:
3
1
(** Formatting Git dates for display.
4
2
5
3
Git records a commit date as a Unix timestamp plus the offset of the zone
lib/views/ui.ml
@@ -1,5 +1,3 @@
1
Removed:
(* -*- mode: tuareg; -*- *)
2
Removed:
3
1
(* Implementation of the site building blocks. The API and its rationale are
4
2
documented in ui.mli; comments here cover implementation choices only.
5
3
lib/views/ui.mli
@@ -1,5 +1,3 @@
1
Removed:
(* -*- mode: tuareg; -*- *)
2
Removed:
3
1
(** Generic site building blocks.
4
2
5
3
This module is the only place in the view layer that names HTML elements. It
test/test_commit_parsing.ml
@@ -1,5 +1,3 @@
1
Removed:
(* -*- mode: tuareg; -*- *)
2
Removed:
3
1
(** Tests for commit message parsing and conventional commit type extraction.
4
2
These functions drive both the pill display and the commit type filter. *)
5
3
test/test_config.ml
@@ -1,5 +1,3 @@
1
Removed:
(* -*- mode: tuareg; -*- *)
2
Removed:
3
1
(** Configuration loading: round-tripping, backward compatibility, and rejection
4
2
of malformed files and out-of-range values. *)
5
3
test/test_diff.ml
@@ -1,5 +1,3 @@
1
Removed:
(* -*- mode: tuareg; -*- *)
2
Removed:
3
1
(** Tests for the line-level diff algorithm and hunk generation. *)
4
2
5
3
let test_line_diff () =
test/test_discovery.ml
@@ -1,5 +1,3 @@
1
Removed:
(* -*- mode: tuareg; -*- *)
2
Removed:
3
1
(** Repository discovery: bare and non-bare layouts, descriptions, and directory
4
2
listings. *)
5
3
test/test_dispatch.ml
@@ -1,5 +1,3 @@
1
Removed:
(* -*- mode: tuareg; -*- *)
2
Removed:
3
1
(** URL dispatch: that {!Ogit.Routes.dispatch} recovers the intended repository
4
2
and action, including from malformed input. *)
5
3
test/test_helpers.ml
@@ -1,5 +1,3 @@
1
Removed:
(* -*- mode: tuareg; -*- *)
2
Removed:
3
1
(** Shared test fixtures. *)
4
2
5
3
let rec remove_path path =
test/test_list_ext.ml
@@ -1,5 +1,3 @@
1
Removed:
(* -*- mode: tuareg; -*- *)
2
Removed:
3
1
(** The list helpers in {!Ogit.List_ext}. *)
4
2
5
3
let list_int = Alcotest.(list int)
test/test_ogit.ml
@@ -1,5 +1,3 @@
1
Removed:
(* -*- mode: tuareg; -*- *)
2
Removed:
3
1
(** Test entry point. Registers every suite; add new suites here. *)
4
2
5
3
let () =
test/test_router.ml
@@ -1,5 +1,3 @@
1
Removed:
(* -*- mode: tuareg; -*- *)
2
Removed:
3
1
(** Router error handling: that invalid names, hashes and missing objects
4
2
produce the intended failure category. *)
5
3
test/test_tree_paths.ml
@@ -1,5 +1,3 @@
1
Removed:
(* -*- mode: tuareg; -*- *)
2
Removed:
3
1
(** Resolving paths within a Git tree, including unreachable objects. *)
4
2
5
3
open Test_helpers
test/test_validation.ml
@@ -1,5 +1,3 @@
1
Removed:
(* -*- mode: tuareg; -*- *)
2
Removed:
3
1
(** Input validation for repository names, hashes, branch names and tag names.
4
2
*)
5
3
test/test_views.ml
@@ -1,5 +1,3 @@
1
Removed:
(* -*- mode: tuareg; -*- *)
2
Removed:
3
1
(** View rendering: currently that the error page carries the requested HTTP
4
2
status. *)
5
3