Sophie

Sophie

distrib > Mageia > 7 > i586 > media > core-release-src > by-pkgid > c5d5f5a6b7e251a1409fa6ef27e29e63 > files > 14

cgit-1.2.1-4.mga7.src.rpm

From 55ebd5e97ccd0da9424d68f1e0f301551cf4b47a Mon Sep 17 00:00:00 2001
From: Christian Hesse <mail@eworm.de>
Date: Tue, 20 Nov 2018 17:31:21 +0100
Subject: [PATCH 14/20] git: update to v2.20.0

Update to git version v2.20.0. Required changes follow upstream commits:

* 00436bf1b1c2a8fe6cf5d2c2457d419d683042f4
  (archive: initialize archivers earlier)

* 611e42a5980a3a9f8bb3b1b49c1abde63c7a191e
  (xdiff: provide a separate emit callback for hunks)

Signed-off-by: Christian Hesse <mail@eworm.de>
---
 Makefile      | 2 +-
 git           | 2 +-
 shared.c      | 2 +-
 ui-snapshot.c | 1 +
 4 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 4aaf2dc..e690c7f 100644
--- a/Makefile
+++ b/Makefile
@@ -14,7 +14,7 @@ htmldir = $(docdir)
 pdfdir = $(docdir)
 mandir = $(prefix)/share/man
 SHA1_HEADER = <openssl/sha.h>
-GIT_VER = 2.19.1
+GIT_VER = 2.20.0
 GIT_URL = https://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.xz
 INSTALL = install
 COPYTREE = cp -r
diff --git a/shared.c b/shared.c
index 7560f5f..a2c0d03 100644
--- a/shared.c
+++ b/shared.c
@@ -325,7 +325,7 @@ int cgit_diff_files(const struct object_id *old_oid,
 		diff_params.flags |= XDF_IGNORE_WHITESPACE;
 	emit_params.ctxlen = context > 0 ? context : 3;
 	emit_params.flags = XDL_EMIT_FUNCNAMES;
-	emit_cb.outf = filediff_cb;
+	emit_cb.out_line = filediff_cb;
 	emit_cb.priv = fn;
 	xdl_diff(&file1, &file2, &diff_params, &emit_params, &emit_cb);
 	if (file1.size)
diff --git a/ui-snapshot.c b/ui-snapshot.c
index 85efe64..9461d51 100644
--- a/ui-snapshot.c
+++ b/ui-snapshot.c
@@ -156,6 +156,7 @@ static int make_snapshot(const struct cgit_snapshot_format *format,
 	ctx.page.mimetype = xstrdup(format->mimetype);
 	ctx.page.filename = xstrdup(filename);
 	cgit_print_http_headers();
+	init_archivers();
 	format->write_func(hex, prefix);
 	return 0;
 }
-- 
2.21.0