]> Untitled Git - git4ai.git/commitdiff
Fix git4ai redirect, fix links git4ai branch page
authorNikolay Shaplov <dhyan@nataraj.su>
Sun, 7 Jun 2026 13:19:22 +0000 (13:19 +0000)
committerNikolay Shaplov <dhyan@nataraj.su>
Sun, 7 Jun 2026 13:19:22 +0000 (13:19 +0000)
cgi/git4ai.pl
conf/nginx/git4ai

index 2272d48c3b8b6f8a8135cddad284ee191eea134b..8823a8dc1d9987bd4700f135288c35e2eaa97b73 100755 (executable)
@@ -28,13 +28,13 @@ print <<HTML;
 
 <p>Это web entry point для ИИ для git репозитория $repo, ветки $branch.</p>
 
-<p>Коммит лог для ветки доступен по ссылке <a href="$BASE_URL/gitai1-log/$repo/$branch/0">вот этой</a> (страница не кешируется)</p>
+<p>Коммит лог для ветки доступен по ссылке <a href="$BASE_URL/git4ai-log/$repo/$branch/0">вот этой</a> (страница не кешируется)</p>
 
-<p>Прочитав коммит лог, ты сможешь посмотреть на ls-tree для заданного коммита по ссылке вида https://gitweb.nataraj.world/gitai-ls-tree/$repo/[commit_id]</p>
+<p>Прочитав коммит лог, ты сможешь посмотреть на ls-tree для заданного коммита по ссылке вида https://gitweb.nataraj.world/git4ai-ls-tree/$repo/[commit_id]</p>
 
 <p>Так же посмотреть на блобы упомянуте в ls-tree по ссылке вида https://gitweb.nataraj.world/gitai-raw/$repo/[blob_id]</p>
 
-<p>А так же на diff самих коммитов по ссылке вида https://gitweb.nataraj.world/gitai-show/[commit_id]</p>
+<p>А так же на diff самих коммитов по ссылке вида https://gitweb.nataraj.world/git4ai-show/$repo/[commit_id]</p>
 
 <p>Полный текст ссылок будет присутвовать на соответсвующих страницах, так что ограничений на fetch у тебя не будет</p>
 
@@ -43,15 +43,4 @@ print <<HTML;
 
 HTML
 
-=cut
-<h2>Список одноразовых ссылок на незакешированный git log для репозитория $repo ветки $branch</h2>
-<ol>
-HTML
-
-for (1..$LINKS) {
-    my $rand = int(rand(1_000_000_000));
-    print "<li><a href=\"$BASE_URL/gitai-log/$repo/$branch/0/r$rand\">r$rand</a></li>\n";
-}
-=cut
-
 print "</ol></body></html>\n";
index 95f461093c55c3b2f3049c4c8b6978d769471773..510d72c06efce33540d6f8d42f79868a17de19b3 100644 (file)
@@ -115,6 +115,10 @@ location ~ "^/git4ai-log/([^/]+)/([^/]+)/([^/]+)$" {
     add_header Cache-Control "no-store" always;
 }
 
+location ~ "^/git4ai/([^/]+)/([^/]+)$" {
+    rewrite ^/git4ai/([^/]+)/([^/]+)$ /git4ai/$1/$2/-/- last;
+}
+
 #                           repo             branch             id                 offset     nonce
 location ~ "^/git4ai[^/]*/([a-zA-Z0-9._-]+)/([a-zA-Z0-9._-]+|-)/([0-9a-f]{4,40}|-)/([0-9]+|-)(?:/([a-zA-Z0-9]+))?$" {
     set $git_repo    $1;