From nobody Wed Mar 15 18:31:06 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PcJqv1cdNz3xc3q; Wed, 15 Mar 2023 18:31:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PcJqv1BDnz3jX8; Wed, 15 Mar 2023 18:31:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678905067; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ST8PPeDLeD2lF66iAyiiCkSAv3ZESgIWze8vbEN1E9A=; b=cPkVH97rkX9E60GIm1z255MZHiZdD+//Wt+bbSZ9Qp2xpsYjnTYJSWJwLtgmfqQhwvzHrb BZeTEDJJ7sVnE5llXSO56DC+IN+gDwG+Fgy4+uY17oDIJYzoI/LY7czhrkhWAjl9FalFHW bOc+cCrTU90lWkQ4r7phJ7zTpgqB2JvPnDvWTa/cPfYIKZQuBWmilhsGBnzcpo7pxSfj0X ZIbNlkYuCAAtlppTboIPk4CXPdipxLm3n+UmN2YRzULaeW8EbZs5ueWt+mfAJu4c3YgvyC QDYilLEirhVDi2CzSeBc2tXt3dFlVOQaHMke959uTvZAXQ7/aMj0Swmr9yMOFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678905067; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ST8PPeDLeD2lF66iAyiiCkSAv3ZESgIWze8vbEN1E9A=; b=Orz0UgCfQpYKfD4iwwDsa6yzWYjdU6bshYqNM7OBDS749hxTC5UWjEonj9AFFC0RilfmU1 1prWC7kVeLpoe7n4O9abSlxnLfHpbEyPQDuwXsdyx04nNRZjvJfvEJvaT9uDUtqqo3nXFs gVNb8eSgO0i+LJQvwCCPqV06HJZd97SjDvJUsBf7Ob3JmWPZ0518fkT8Uc3tc1KUzQrkhd Iapd8JAKVoGXRG2AFbFRyNQ4pWYt3lZbKs+X7LpValotfUHotaHPpu3H1JZYltllb2KVrk VXP3d8IivM5FWwZdraAvJr4a1iMdp8W7VhEi0zmxDhWq1Ha3oBEyk1/gfhnZDw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1678905067; a=rsa-sha256; cv=none; b=R+0gBQ+Jto8405TiURdQX3UVNnJgj8A2F4fnxNdgdllrMBGPN2oZPnCFIzm/gEATzDBlXl I8wkdoNd++mfB+4+i/uImfFETtYQ3XwDSeOAm38dWsVJCC31vpMxhMzEyywstxgSL14I8m RfBeIvKYq/VIKtvnADlgLLZJFUBspgcbITLGW3eVTOmeaOESlkkysYM46yapp2ul/KMKmR OhRbfDgMpEga9PMZggq15p6xXpqh5dPeFEJOUFkVSNE5KfoR5tgGgsYBA683R++5UcuRdt AjPpOOkOkQYx2OK7RTi9ZJiRl5XaHdY9F74NyZDe+XqUs+lsoK+CMHyyKE2DDw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PcJqv0G1gz1RG4; Wed, 15 Mar 2023 18:31:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 32FIV6d5034596; Wed, 15 Mar 2023 18:31:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 32FIV68j034580; Wed, 15 Mar 2023 18:31:06 GMT (envelope-from git) Date: Wed, 15 Mar 2023 18:31:06 GMT Message-Id: <202303151831.32FIV68j034580@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Jan Beich Subject: git: 97d454cb324d - main - devel/git-cinnabar: unbreak after d3a5eb641d28 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jbeich X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 97d454cb324d5a1dae16cde52dd2f412ea571c02 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jbeich: URL: https://cgit.FreeBSD.org/ports/commit/?id=97d454cb324d5a1dae16cde52dd2f412ea571c02 commit 97d454cb324d5a1dae16cde52dd2f412ea571c02 Author: Jan Beich AuthorDate: 2023-03-15 18:03:15 +0000 Commit: Jan Beich CommitDate: 2023-03-15 18:30:21 +0000 devel/git-cinnabar: unbreak after d3a5eb641d28 patch -p1 -F0 -o helper/object-file.patched.c git-core/object-file.c < helper/object-file.c.patch Hmm... Looks like a unified diff to me... The text leading up to this was: -------------------------- |diff --git a/object-file.c b/object-file.c |index 8be57f48de..52315414f3 100644 |--- a/object-file.c |+++ b/object-file.c -------------------------- Patching file git-core/object-file.c using Plan A... Hunk #1 failed at 34. 1 out of 1 hunks failed--saving rejects to helper/object-file.patched.c.rej done gmake[2]: *** [helper/helper.mk:104: helper/object-file.patched.c] Error 1 PR: 270222 --- devel/git-cinnabar/Makefile | 2 +- devel/git-cinnabar/files/patch-git-2.40 | 124 ++++++++++++++++++++++++++++++++ 2 files changed, 125 insertions(+), 1 deletion(-) diff --git a/devel/git-cinnabar/Makefile b/devel/git-cinnabar/Makefile index 10fcb797153b..84f39404465a 100644 --- a/devel/git-cinnabar/Makefile +++ b/devel/git-cinnabar/Makefile @@ -1,6 +1,6 @@ PORTNAME= git-cinnabar DISTVERSION= 0.5.11 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= devel MAINTAINER= jbeich@FreeBSD.org diff --git a/devel/git-cinnabar/files/patch-git-2.40 b/devel/git-cinnabar/files/patch-git-2.40 new file mode 100644 index 000000000000..875927c5f745 --- /dev/null +++ b/devel/git-cinnabar/files/patch-git-2.40 @@ -0,0 +1,124 @@ +https://github.com/glandium/git-cinnabar/commit/6c77d861b70a + +--- helper/cinnabar-fast-import.c.orig 2022-10-28 23:43:03 UTC ++++ helper/cinnabar-fast-import.c +@@ -422,12 +422,17 @@ static void handle_changeset_conflict(struct hg_object + ensure_notes(&git2hg); + while ((note = get_note(&git2hg, git_id))) { + struct hg_object_id oid; ++ struct object_info oi = OBJECT_INFO_INIT; + enum object_type type; + unsigned long len; +- char *content = read_object_file_extended( +- the_repository, note, &type, &len, 0); +- if (len < 50 || !starts_with(content, "changeset ") || +- get_sha1_hex(&content[10], oid.hash)) ++ char *content; ++ oi.typep = &type; ++ oi.sizep = &len; ++ oi.contentp = (void **) &content; ++ if ((oid_object_info_extended( ++ the_repository, note, &oi, OBJECT_INFO_DIE_IF_CORRUPT) == 0) && ++ (len < 50 || !starts_with(content, "changeset ") || ++ get_sha1_hex(&content[10], oid.hash))) + die("Invalid git2hg note for %s", oid_to_hex(git_id)); + + free(content); +@@ -437,10 +442,12 @@ static void handle_changeset_conflict(struct hg_object + break; + + if (!buf.len) { +- content = read_object_file_extended( +- the_repository, git_id, &type, &len, 0); +- strbuf_add(&buf, content, len); +- free(content); ++ if (oid_object_info_extended( ++ the_repository, git_id, &oi, ++ OBJECT_INFO_DIE_IF_CORRUPT) == 0) { ++ strbuf_add(&buf, content, len); ++ free(content); ++ } + } + + strbuf_addch(&buf, '\0'); +--- helper/cinnabar-helper.c.orig 2022-10-28 23:43:03 UTC ++++ helper/cinnabar-helper.c +@@ -1554,11 +1554,17 @@ static void upgrade_files(const struct old_manifest_tr + if (note && oidcmp(note, &entry.other_oid)) { + struct hg_file file; + struct strbuf buf = STRBUF_INIT; ++ struct object_info oi = OBJECT_INFO_INIT; + unsigned long len; + enum object_type t; + char *content; +- content = read_object_file_extended( +- the_repository, note, &t, &len, 0); ++ oi.typep = &t; ++ oi.sizep = &len; ++ oi.contentp = (void **) &content; ++ if (oid_object_info_extended( ++ the_repository, note, &oi, ++ OBJECT_INFO_DIE_IF_CORRUPT) != 0) ++ goto corrupted; + strbuf_attach(&buf, content, len, len); + hg_file_init(&file); + hg_file_from_memory(&file, &hg_oid, &buf); +--- helper/hg-data.c.orig 2022-10-28 23:43:03 UTC ++++ helper/hg-data.c +@@ -33,11 +33,16 @@ void hg_file_load(struct hg_file *result, const struct + void hg_file_load(struct hg_file *result, const struct hg_object_id *oid) + { + const struct object_id *note; ++ struct object_info oi = OBJECT_INFO_INIT; + char *content; + enum object_type type; + unsigned long len; + size_t metadata_len; + ++ oi.typep = &type; ++ oi.sizep = &len; ++ oi.contentp = (void **) &content; ++ + strbuf_release(&result->file); + hg_oidcpy(&result->oid, oid); + +@@ -47,9 +52,9 @@ void hg_file_load(struct hg_file *result, const struct + ensure_notes(&files_meta); + note = get_note_hg(&files_meta, oid); + if (note) { +- content = read_object_file_extended( +- the_repository, note, &type, &len, 0); +- if (!content) ++ if (oid_object_info_extended( ++ the_repository, note, &oi, ++ OBJECT_INFO_DIE_IF_CORRUPT) != 0) + die("Missing data"); + strbuf_add(&result->file, "\1\n", 2); + strbuf_add(&result->file, content, len); +@@ -64,9 +69,9 @@ void hg_file_load(struct hg_file *result, const struct + if (!note) + die("Missing data"); + +- content = read_object_file_extended( +- the_repository, note, &type, &len, 0); +- if (!content) ++ if (oid_object_info_extended( ++ the_repository, note, &oi, ++ OBJECT_INFO_DIE_IF_CORRUPT) != 0) + die("Missing data"); + + strbuf_add(&result->file, content, len); +--- helper/object-file.c.patch.orig 2022-10-28 23:43:03 UTC ++++ helper/object-file.c.patch +@@ -2,9 +2,9 @@ +++ b/object-file.c + index 8be57f48de..52315414f3 100644 + --- a/object-file.c + +++ b/object-file.c +-@@ -34,6 +34,8 @@ +- #include "promisor-remote.h" ++@@ -35,6 +35,8 @@ + #include "submodule.h" ++ #include "fsck.h" + + +#define write_object_file_flags real_write_object_file_flags + +