Commit 7297df206fee11c79ba872b2c7f67ca9a71bbd15

Thomas de Grivel 2022-07-07T16:46:45

do not display tags without log

diff --git a/lib/kmxgit_web/controllers/repository_controller.ex b/lib/kmxgit_web/controllers/repository_controller.ex
index a946b5f..236969b 100644
--- a/lib/kmxgit_web/controllers/repository_controller.ex
+++ b/lib/kmxgit_web/controllers/repository_controller.ex
@@ -329,6 +329,9 @@ defmodule KmxgitWeb.RepositoryController do
     slug = Repository.full_slug(repo)
     log1 = case Git.log(slug, tree, path || "", 0, 1) do
              {:ok, [log1]} -> log1
+             {:ok, result} ->
+               IO.inspect({:log1, result})
+               nil
              {:error, err} ->
                IO.inspect(err)
                nil
@@ -457,7 +460,7 @@ defmodule KmxgitWeb.RepositoryController do
     |> git_put_log1(repo, tree, path)
     |> git_put_tags(repo, conn, op, nil)
     tag = Enum.find(git.tags, fn tag -> tag == tree end)
-    if tag do
+    if git.log1 && tag do
       conn
       |> assign_current_organisation(org)
       |> assign(:current_repository, repo)