Date: Fri, 30 Apr 2021 18:35:33 -0700 From: David Wolfskill <david@catwhisker.org> To: tech-lists <tech-lists@zyxst.net> Cc: freebsd-git@freebsd.org Subject: Re: git cherry-pick Message-ID: <YIywZZ2pDdEJizlA@albert.catwhisker.org> In-Reply-To: <YIyqSef2RKXXOqAa@ceres.zyxst.net> References: <YIyqSef2RKXXOqAa@ceres.zyxst.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--xODsafbnC9KOsOiJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, May 01, 2021 at 02:09:29AM +0100, tech-lists wrote: > git newbie here. If one has the full git /usr/src repo, and wants to > build for stable/13, what are the commands to "cherry-pick" a commit from= main > and apply it to (local) stable/13?=20 >=20 > thanks, > --=20 > J. I strongly suspect that the most correct succinct answer will be "it depends." Unfortunately, that's not especially useful. So: here is *a* way that worked in this specific set of circumstances: | g1-55(12.2-S)[9] cd /bkp/tmp/ | g1-55(12.2-S)[10] ls -F | ... | g1-55(12.2-S)[11] mkdir src So: I switched over to a place where I had some scratch space (as I have no plans to keep this repository). | g1-55(12.2-S)[12] git clone file:///repo/git/freebsd/src.git src | Cloning into 'src'... I keep a local private mirror of the FreeBSD.org git repo. <shrug> I could have used "https://git.freebsd.org/src.git", but it would have taken longer, and might have interfered with Spouse's streaming video. | remote: Enumerating objects: 429434, done. | remote: Counting objects: 100% (429434/429434), done. | remote: Compressing objects: 100% (45509/45509), done. | Receiving objects: 100% (3874077/3874077), 1.19 GiB | 32.66 MiB/s, done. | remote: Total 3874077 (delta 411617), reused 386363 (delta 383799), pack-= reused 3444643 | Resolving deltas: 100% (3066950/3066950), done. | Updating files: 100% (86557/86557), done. | g1-55(12.2-S)[13] cd src | g1-55(12.2-S)[14] git branch | cat | * main So this repo is currently using branch "main". I'll find a commit to cherry-pick. | g1-55(12.2-S)[15] git log -n 1 | cat | commit 388c0cde10293d9a3434e99146bf391aec6878a3 | Author: Kristof Provost <kp@FreeBSD.org> | Date: Tue Apr 27 18:46:03 2021 +0200 |=20 | pf tests: Test scrub fragment reassemble on interfaces with different= MTU | =20 | There's a problem with pf's reassembly code where it produces incorre= ct | checksums when reassembling across interfaces with different MTUs. | Test this. | =20 | PR: 255432 | Reviewed by: donner | MFC after: 1 week | Sponsored by: Rubicon Communications, LLC ("Netgate") | Differential Revision: https://reviews.freebsd.org/D30013 OK; that seems like a reasonable candidate.... | g1-55(12.2-S)[16] git checkout stable/13 | Branch 'stable/13' set up to track remote branch 'stable/13' from 'origin= '. | Switched to a new branch 'stable/13' I switched to stable/13. | g1-55(12.2-S)[17] git cherry-pick 388c0cde10293d9a3434e99146bf391aec6878a3 | [stable/13 419302f5369] pf tests: Test scrub fragment reassemble on inter= faces with different MTU | Author: Kristof Provost <kp@FreeBSD.org> | Date: Tue Apr 27 18:46:03 2021 +0200 | 1 file changed, 49 insertions(+) | g1-55(12.2-S)[18]=20 And that was the cherry-pick. Mind, there exist ... nuances, I suppose. If the commit to be cherry-picked is a merge commit, you will need to provide some addiitonal information (as detailed in the output of "git help cherry-pick"). Caveat: While I do use some of this at work, I am by no means an "expert." I suspect that there may well be "sharp edges" in some of this stuff. I suggest that if you have the resources to do so, you experiment with an expendable copy of your repo first. Oh: after all that: | g1-55(12.2-S)[18] git status=20 | On branch stable/13 | Your branch is ahead of 'origin/stable/13' by 1 commit. | (use "git push" to publish your local commits) |=20 | nothing to commit, working tree clean | g1-55(12.2-S)[19]=20 Peace, david --=20 David H. Wolfskill david@catwhisker.org "some of the terminology that was used, like 'hugs and kisses,' and 'very fine people,' is like very different from what I experienced and what my co-workers experienced on the 6th." - Michael Fanone, DC Metro Police Offic= er See https://www.catwhisker.org/~david/publickey.gpg for my public key. --xODsafbnC9KOsOiJ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGTBAEBCgB9FiEE4owz2QxMJyaxAefyQLJg+bY2PckFAmCMsGVfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEUy OEMzM0Q5MEM0QzI3MjZCMTAxRTdGMjQwQjI2MEY5QjYzNjNEQzkACgkQQLJg+bY2 PcnEBQf/dEs7yt+gdrmgePlfQQig5xPYOsgcYzLeXUaVyK3yMa+pou8oOnRjrCev 6C3ZZp7kbbua/B4bSLHw29aOjiezqcxio+Qt+t+Rdh6gT2SV7OTCXLgpTMCBWji7 VxUDprXEGY5rb6rCb/bRaizbF2Qm17SW9yC1ypAv6zjj3YCVpQaXiQTxrBs4pS7Z EsO27ZebuWeH/JydxXNNLu2cnPoz9dFGhkQMZ5x21adSj0ZbXenPxSJH9kW7aWid mdxlngTTgiht5BupYd1RlhZ8tIaDC6S4uydoSNis8Lj+5SP8VBBeNDfMYGrwbRk3 /05Q4OwRjNpSI7uMCCuG1QwNvh1wCg== =QBIc -----END PGP SIGNATURE----- --xODsafbnC9KOsOiJ--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?YIywZZ2pDdEJizlA>