Commit d1e91dec68e494434ba88b3b858165103baba902

Thomas de Grivel 2022-01-13T21:07:29

fix diff

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/lib/kmxgit_web/controllers/repository_controller.ex b/lib/kmxgit_web/controllers/repository_controller.ex
index 5e29514..318db0b 100644
--- a/lib/kmxgit_web/controllers/repository_controller.ex
+++ b/lib/kmxgit_web/controllers/repository_controller.ex
@@ -317,7 +317,7 @@ defmodule KmxgitWeb.RepositoryController do
   end
   defp show_op(conn, :commit, _branch, git, org, _path, repo, _user) do
     IO.inspect(git)
-    {:ok, diff} = GitManager.diff(Repository.full_slug(repo), git.log1.hash, "#{git.log1.hash}~1")
+    {:ok, diff} = GitManager.diff(Repository.full_slug(repo), "#{git.log1.hash}~1", git.log1.hash)
     diff_html = Pygmentize.html(diff, "diff.patch")
     conn
     |> assign(:commit, git.log1)