From f92a0b68fed81128fa278e82aa0e3d49d74ffdf6 Mon Sep 17 00:00:00 2001 From: Mario Lubenka Date: Fri, 4 Oct 2019 21:58:54 +0200 Subject: Bugfix for image compare and minor improvements to image compare (#8289) * Resolve error when comparing images Signed-off-by: Mario Lubenka * Check blob existence instead of git-ls when checking if file exists Signed-off-by: Mario Lubenka * Show file metadata also when a file was newly added Signed-off-by: Mario Lubenka * Fixes error in commit view Signed-off-by: Mario Lubenka * Excludes assigning path and image infos for compare routers to service package Signed-off-by: Mario Lubenka * Removes nil default and fixes import order Signed-off-by: Mario Lubenka * Adds missing comments Signed-off-by: Mario Lubenka * Moves methods for assigning compare data to context into repo router package Signed-off-by: Mario Lubenka * Show image compare for deleted images as well. Simplify check if image should be displayed Signed-off-by: Mario Lubenka --- templates/repo/diff/box.tmpl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'templates/repo/diff/box.tmpl') diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl index edc04f9068..b5fde36a6f 100644 --- a/templates/repo/diff/box.tmpl +++ b/templates/repo/diff/box.tmpl @@ -106,7 +106,12 @@
{{if ne $file.Type 4}} - {{$isImage := (call $.IsImageFile $file.Name)}} + {{$isImage := false}} + {{if $file.IsDeleted}} + {{$isImage = (call $.IsImageFileInBase $file.Name)}} + {{else}} + {{$isImage = (call $.IsImageFileInHead $file.Name)}} + {{end}}
-- cgit v1.2.3