From nobody Tue Mar 28 03:55:07 2023 X-Original-To: freebsd-hackers@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 4PlwnC4kbjz42WrD for ; Tue, 28 Mar 2023 03:55:11 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta001.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PlwnB54R7z3HFr for ; Tue, 28 Mar 2023 03:55:10 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=none (mx1.freebsd.org: domain of cy.schubert@cschubert.com has no SPF policy when checking 3.97.99.32) smtp.mailfrom=cy.schubert@cschubert.com; dmarc=none Received: from shw-obgw-4002a.ext.cloudfilter.net ([10.228.9.250]) by cmsmtp with ESMTP id gqTmperLjuZMSh0QPpZjvA; Tue, 28 Mar 2023 03:55:09 +0000 Received: from spqr.komquats.com ([70.66.148.124]) by cmsmtp with ESMTPA id h0QOp45psyAOeh0QPp3Bsp; Tue, 28 Mar 2023 03:55:09 +0000 X-Authority-Analysis: v=2.4 cv=e5oV9Il/ c=1 sm=1 tr=0 ts=6422651d a=Cwc3rblV8FOMdVN/wOAqyQ==:117 a=Cwc3rblV8FOMdVN/wOAqyQ==:17 a=kj9zAlcOel0A:10 a=k__wU0fu6RkA:10 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=pyn-8fn7wKyj4KAFgmcA:9 a=CjuIK1q_8ugA:10 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id DB8B4E8E for ; Mon, 27 Mar 2023 20:55:07 -0700 (PDT) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 9B8632CD; Mon, 27 Mar 2023 20:55:07 -0700 (PDT) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: freebsd-hackers@freebsd.org Subject: Re: what's the Correct git update method keeping local changes In-reply-to: References: Comments: In-reply-to void message dated "Tue, 28 Mar 2023 04:19:19 +0100." List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 27 Mar 2023 20:55:07 -0700 Message-Id: <20230328035507.9B8632CD@slippy.cwsent.com> X-CMAE-Envelope: MS4xfPHYr27aNnC5D2n3wO0y09ZBmLJhuTcpAncVNHrJ/hFK6nV5P0g1Gu5Uv3kn+yTrzI0dU5kS520bqqDiLPmUvwirlaPEwMqCHGvndMw7GP7w9BLs94d1 3j44W4kU0ii39GIrH6wTvSdeK5vHQ9teLt/HLekebFEXvdWNG8ISbMMXCo9299qqJRMs/OZLCEpvU2itFk3iczVskVteJeiUOBI= X-Spamd-Result: default: False [-1.79 / 15.00]; AUTH_NA(1.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; NEURAL_HAM_LONG(-1.00)[-0.999]; NEURAL_HAM_SHORT(-1.00)[-0.996]; MV_CASE(0.50)[]; RCVD_IN_DNSWL_MED(-0.20)[3.97.99.32:from]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; DMARC_NA(0.00)[cschubert.com: no valid DMARC record]; FROM_HAS_DN(0.00)[]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; REPLYTO_EQ_FROM(0.00)[]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; TO_DN_NONE(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[3.97.99.32:from] X-Rspamd-Queue-Id: 4PlwnB54R7z3HFr X-Spamd-Bar: - X-ThisMailContainsUnwantedMimeParts: N In message , void writes: > Hello hackers@ > > I looked in the porters and developers handbooks and couldn't find reference > to a Correct method of working with git, poudriere, the ports tree and > local changes for a use case like mine. > > Right now my workflow looks like this: > > 1. apply patch either with patch -p0 < patchfile or git apply from the > top of the ports tree > 2. git stash > 3. poudriere ports -u -q > 4. git stash pop > 5. run the poudriere build That's one way to do it. > > then, subsequent poudriere builds need steps 2-5 repeated. > > I'm wary of git merge/apply because i'm not a dev and so don't want to push > changes. but I want to update the ports tree for poudriere with local changes > keeping them local. > > What's the best way? > -- > I maintain my own branch which contains my patches. In fact I maintain a branch for each patch. I then do a git cherry-pick from each patch branch to my own branch. To update I git fetch followed by a git rebase origin/main while within my branch. This brings my branch up to date. I maintain a separate repo, owned by a separate account, from which my poudriere builds its packages. This is a little extra work but keeps my development work totally separate from anything I'm developing. I do the same with my src tree, which has patches that I have no intention of committing, yet, if ever. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0