git » git-arr » commit 6b44098

Add basic submodules support

author Alberto Bertogli
2025-04-27 15:50:48 UTC
committer Alberto Bertogli
2025-04-27 16:17:20 UTC
parent 87d4f63920ff836b6872984d64a23014a9bc681c

Add basic submodules support

Currently, submodule paths are skipped in the tree list.

That makes them invisible, which is quite inconvenient.

This patch makes git-arr show submodule entries in the listing, and
mentions they are a submodule. This is the bare minimum support
possible, but it is much better than skipping the entries.

Thanks to Stephen Paul Weber <singpolyma@singpolyma.net> for noticing
the issue and suggesting this improvement!

views/tree-list.html +3 -0

diff --git a/views/tree-list.html b/views/tree-list.html
index ce5b0d6..89549bd 100644
--- a/views/tree-list.html
+++ b/views/tree-list.html
@@ -10,6 +10,9 @@
         <td class="name">
             <a class="explicit" href="{{treeroot}}/{{name.url}}/">
                 {{!name.html}}/</a></td>
+%   elif type == "commit":
+        <td class="name">{{!name.html}}</td>
+        <td class="size">(submodule)</td>
 %   end
     </tr>
 % end