Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Jun 2017 15:10:35 +0000 (UTC)
From:      Adam Weinberger <adamw@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r443008 - in head/devel/cgit: . files
Message-ID:  <201706091510.v59FAZGf032762@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adamw
Date: Fri Jun  9 15:10:35 2017
New Revision: 443008
URL: https://svnweb.freebsd.org/changeset/ports/443008

Log:
  Update included git to 2.13.1.

Added:
  head/devel/cgit/files/patch-git-2.13.1   (contents, props changed)
Modified:
  head/devel/cgit/Makefile
  head/devel/cgit/distinfo

Modified: head/devel/cgit/Makefile
==============================================================================
--- head/devel/cgit/Makefile	Fri Jun  9 15:09:07 2017	(r443007)
+++ head/devel/cgit/Makefile	Fri Jun  9 15:10:35 2017	(r443008)
@@ -2,7 +2,7 @@
 
 PORTNAME=	cgit
 PORTVERSION=	1.1
-PORTREVISION=	4
+PORTREVISION=	5
 CATEGORIES=	devel www
 MASTER_SITES=	http://git.zx2c4.com/cgit/snapshot/:cgit \
 		https://www.kernel.org/pub/software/scm/git/:git
@@ -15,7 +15,7 @@ COMMENT=	Fast, lightweight web frontend for Git reposi
 LICENSE=	GPLv2
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-GIT_VERSION=	2.13.0
+GIT_VERSION=	2.13.1
 USES=		cpe gmake iconv shebangfix ssl tar:xz
 CPE_VENDOR=	lars_hjemli
 SHEBANG_FILES=	filters/html-converters/rst2html

Modified: head/devel/cgit/distinfo
==============================================================================
--- head/devel/cgit/distinfo	Fri Jun  9 15:09:07 2017	(r443007)
+++ head/devel/cgit/distinfo	Fri Jun  9 15:10:35 2017	(r443008)
@@ -1,5 +1,5 @@
-TIMESTAMP = 1494441096
+TIMESTAMP = 1497020930
 SHA256 (cgit-1.1.tar.xz) = 0889af29be15fc981481caa09579f982b9740fe9fd2860ab87dff286f4635890
 SIZE (cgit-1.1.tar.xz) = 86268
-SHA256 (git-2.13.0.tar.xz) = 4bbf2ab6f2341253a38f95306ec7936833eb1c42572da5c1fa61f0abb2191258
-SIZE (git-2.13.0.tar.xz) = 4744388
+SHA256 (git-2.13.1.tar.xz) = 3bc1becd983f77ab154a46801624369dbc40c3dd04b4c4b07ad026f5684688fe
+SIZE (git-2.13.1.tar.xz) = 4746640

Added: head/devel/cgit/files/patch-git-2.13.1
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/cgit/files/patch-git-2.13.1	Fri Jun  9 15:10:35 2017	(r443008)
@@ -0,0 +1,72 @@
+From af3025cf50642452a2000327bb8e845fd2191423 Mon Sep 17 00:00:00 2001
+From: Christian Hesse <mail@eworm.de>
+Date: Tue, 6 Jun 2017 17:16:32 +0200
+Subject: git: update to v2.13.1
+
+Update to git version v2.13.1: With commit 8aee769f (pathspec: copy and free
+owned memory) the definition of struct pathspec_item has changed with the
+expectation that pathspecs will be managed dynamically. We work around this
+a bit by setting up a static structure, but let's allocate the match string
+to avoid needing to cast away const.
+
+Updated a patch from John Keeping <john@keeping.me.uk> for git v2.12.1.
+---
+ git       | 2 +-
+ shared.c  | 4 +++-
+ ui-blob.c | 9 ++++++---
+ 3 files changed, 10 insertions(+), 5 deletions(-)
+
+diff --git a/shared.c b/shared.c
+index c63f1e3..13a65a9 100644
+--- shared.c
++++ shared.c
+@@ -352,7 +352,7 @@ void cgit_diff_tree(const struct object_id *old_oid,
+ 	opt.format_callback = cgit_diff_tree_cb;
+ 	opt.format_callback_data = fn;
+ 	if (prefix) {
+-		item.match = prefix;
++		item.match = xstrdup(prefix);
+ 		item.len = strlen(prefix);
+ 		opt.pathspec.nr = 1;
+ 		opt.pathspec.items = &item;
+@@ -365,6 +365,8 @@ void cgit_diff_tree(const struct object_id *old_oid,
+ 		diff_root_tree_sha1(new_oid->hash, "", &opt);
+ 	diffcore_std(&opt);
+ 	diff_flush(&opt);
++
++	free(item.match);
+ }
+ 
+ void cgit_diff_commit(struct commit *commit, filepair_fn fn, const char *prefix)
+diff --git a/ui-blob.c b/ui-blob.c
+index 5f30de7..793817f 100644
+--- ui-blob.c
++++ ui-blob.c
+@@ -38,7 +38,7 @@ int cgit_ref_path_exists(const char *path, const char *ref, int file_only)
+ 	struct object_id oid;
+ 	unsigned long size;
+ 	struct pathspec_item path_items = {
+-		.match = path,
++		.match = xstrdup(path),
+ 		.len = strlen(path)
+ 	};
+ 	struct pathspec paths = {
+@@ -53,10 +53,13 @@ int cgit_ref_path_exists(const char *path, const char *ref, int file_only)
+ 	};
+ 
+ 	if (get_oid(ref, &oid))
+-		return 0;
++		goto done;
+ 	if (sha1_object_info(oid.hash, &size) != OBJ_COMMIT)
+-		return 0;
++		goto done;
+ 	read_tree_recursive(lookup_commit_reference(oid.hash)->tree, "", 0, 0, &paths, walk_tree, &walk_tree_ctx);
++
++done:
++	free(path_items.match);
+ 	return walk_tree_ctx.found_path;
+ }
+ 
+-- 
+cgit v1.1-9-ge9c1d
+



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201706091510.v59FAZGf032762>