Commit a5f474a0df0158f45b9c7102ed08dffa2642c580

Thomas de Grivel 2022-02-01T01:29:24

fix new repo

diff --git a/lib/kmxgit_web/controllers/repository_controller.ex b/lib/kmxgit_web/controllers/repository_controller.ex
index 72c2b9a..8caacd0 100644
--- a/lib/kmxgit_web/controllers/repository_controller.ex
+++ b/lib/kmxgit_web/controllers/repository_controller.ex
@@ -211,6 +211,9 @@ defmodule KmxgitWeb.RepositoryController do
     git
   end
 
+  defp git_put_files(git, repo, nil, subdir, conn) do
+    git
+  end
   defp git_put_files(git = %{valid: true}, repo, tree, subdir, conn) do
     case GitManager.files(Repository.full_slug(repo), tree, subdir || "") do
       {:ok, []} -> git
diff --git a/lib/kmxgit_web/router.ex b/lib/kmxgit_web/router.ex
index 158c667..b03a427 100644
--- a/lib/kmxgit_web/router.ex
+++ b/lib/kmxgit_web/router.ex
@@ -62,7 +62,7 @@ end
 
     get "/_log_in", UserSessionController, :new
     get "/_register", UserRegistrationController, :new
-    get "/_reset_password", UserResetPasswordController, :new
+    get "/_reset_password",        UserResetPasswordController, :new
     get "/_reset_password/:token", UserResetPasswordController, :edit
     put "/_reset_password/:token", UserResetPasswordController, :update