From nobody Sat Aug 28 20:44:34 2021 X-Original-To: freebsd-git@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 4A616178AFB3 for ; Sat, 28 Aug 2021 20:44:38 +0000 (UTC) (envelope-from dbaio@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GxpVG13gSz4t0N for ; Sat, 28 Aug 2021 20:44:38 +0000 (UTC) (envelope-from dbaio@FreeBSD.org) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com [66.111.4.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: dbaio/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 0748FC68B for ; Sat, 28 Aug 2021 20:44:38 +0000 (UTC) (envelope-from dbaio@FreeBSD.org) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailauth.nyi.internal (Postfix) with ESMTP id EA61927C0054 for ; Sat, 28 Aug 2021 16:44:37 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Sat, 28 Aug 2021 16:44:37 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudduhedgudehgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffukfggtggusehgtderre dttddvnecuhfhrohhmpedfffgrnhhilhhoucfirdcuuegrihhofdcuoegusggrihhosefh rhgvvgeuufffrdhorhhgqeenucggtffrrghtthgvrhhnpedtkefhfedvkeekuedvveduhf duteeuhfdutefhuefhkeduvedttdfftddvteehteenucffohhmrghinhepfhhrvggvsghs ugdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpegusggrihhoodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdduudekudef leduvddtqddvieektddvjeeikedquggsrghioheppefhrhgvvgeuufffrdhorhhgsehfrg hsthhmrghilhdrtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Sat, 28 Aug 2021 16:44:36 -0400 (EDT) Date: Sat, 28 Aug 2021 17:44:34 -0300 From: "Danilo G. Baio" To: freebsd-git@FreeBSD.org Subject: Phabricator workflow with Git Message-ID: <20210828204434.n45rsndnehy2tsnb@t480.local> List-Id: Discussion of git use in the FreeBSD project List-Archive: https://lists.freebsd.org/archives/freebsd-git List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-git@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="iebmsg3wjstadjx3" Content-Disposition: inline X-ThisMailContainsUnwantedMimeParts: N --iebmsg3wjstadjx3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi. I'm currently using this workflow: - - - - - - - - - - - - - - - - - - - - - - - - - // Create a new branch $ git checkout -b FEATURE // Change stuff and git commit // Note that you already can include the Review information in // Phabricator format. ``` <> Summary: Test Plan: Reviewers: Subscribers: ``` // Open a review with the first commit $ arc diff --create HEAD~ // If it's accepted, fix the commit log message, rebase with main // branch, and push $ git commit --amend $ git rebase -i main $ git push remote_name FEATURE:main // If it's NOT accepted // Change stuff and add a second git commit // Update review with the two commits $ arc diff --update DXXXXX HEAD~2 // If it's accepted, you can soft reset both commits and do a new one // or, just use `git merge and squash`. // merge/squash way // Set the second commit to be squashed $ git rebase -i main ``` pick 954c5d4626 Readme: First commit squash 7231873f23 Makefile: Second commit ``` or $ git reset --soft HEAD~2 // And add a final commit // Submit $ git push remote_name FEATURE:main // Delete FEATURE branch $ git checkout main $ git pull origin main --no-ff $ git branch -d FEATURE - - - - - - - - - - - - - - - - - - - - - - - - - That is it. I know there are git-arc (tools/tools/git-arc) on base, but I still didn't use it. I just want to check if there are other ways to do that (that you recommend), or if can I document it, at least for now, on our Phabricator Wiki page [1]. 1 - https://wiki.freebsd.org/Phabricator Regards. --=20 Danilo G. Baio (dbaio) --iebmsg3wjstadjx3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAABCgB9FiEEORj0UTsjzCy+enIkmpN7LfMuiNcFAmEqoC5fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDM5 MThGNDUxM0IyM0NDMkNCRTdBNzIyNDlBOTM3QjJERjMyRTg4RDcACgkQmpN7LfMu iNeDBg/+KXKbIDTRABliByBtpp7dkTkQNoTVnJ1unvwyi5+wI3oaFc0wc/wjaQ0M djFBCoQAvCxPTv3AA6cX1aMlUyOy3t+1+UPHrVkL6NDPkoEWAxcr389oPBcGopv8 bknINgBN4gRav8/gXXXt7M4hktzqyWNck0gxsh9KMXuXSd5584B6ZY6TfBSWP+dW 9dNg0zZ7B3y93k9utfLt/UTF48saMsuuJJubK2m6ReLuzaPy9pH985A9pVjclHQr PctJOBWAY46Eo81Xge/oV3sgh7cm3nHfQg8hAn6jt4QMIoyO+eHOGSuEdhYVLVHi BoF89MCCZQaWpBCicvHAuO+rbwAika61Au9McIoj1PHzIqX6fNYBWMsAfMxf1JKV t1HOIPVbqQfjMGCdtZ9fTD1ZyObX77Jl+0PdStTjQpQi0NvksnVdiqHkZHoST+HM Yihejo79UL7ZUPEDM45E32/P5ZtDkXIVmIXFsf7hWux1N4k9tS7ohnQjNZpUPqlF ks3Z67iyoI7IQKmC5pNlyHsZrB8/H5xnBA/E694qs+sKe28KBPwt8ReevFUnq9Qd /01M3H6QlXyoBzOWR0bqk72awkcqrGcEqNCXkwvwAcAC5/Q/g6kjilplYcPwJ8ov FiDvuIGeG+g546XIcA0iQ12zHPytgnIyxEn3VKLfC3XkDHsY25k= =sZFC -----END PGP SIGNATURE----- --iebmsg3wjstadjx3-- From nobody Sat Aug 28 21:02:00 2021 X-Original-To: freebsd-git@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 6FB82179B2F5 for ; Sat, 28 Aug 2021 21:02:17 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-vk1-xa2a.google.com (mail-vk1-xa2a.google.com [IPv6:2607:f8b0:4864:20::a2a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gxptd208dz3DvV for ; Sat, 28 Aug 2021 21:02:17 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-vk1-xa2a.google.com with SMTP id j12so3057917vka.6 for ; Sat, 28 Aug 2021 14:02:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wLzdTWQRtt3BFKpPOOAcK2Zegi8mb4Q9ve3h+iaL3Ps=; b=ksnzLigXzbyzrD6wRfkR1MADF75R/0gqiKsSqtLm4U9tdjuiZGUIhsaZEXsynvXdoL cWAGpum4fEH35U2GWIrQxe1SdChaqqw6TOMmd9OTfiDSHM/I5NVBUgEIwm+g/T1FL5lb xsjIU6j+TENGUIg4RRalcYeQFCKU70NibIZK8YASBs5G/uUJAOReq20k7eYCMmyBa4zD OcoPzQAtbUAFsFz5xMRpOlwSQQS4uQ4uor8xwxMrb1EMA1Z8fPuKpXkknpIdyERmmvoC h9xGe3JX0U7mJ6OnjygzJt5a32TrT2z2Go7IH1avdXMA6LTuvy5I9dWNV3krea/Unbgt 8AbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wLzdTWQRtt3BFKpPOOAcK2Zegi8mb4Q9ve3h+iaL3Ps=; b=Kt5DxdI8Hfw8/X1i7IYYNsSctBJrdGP45Q8k6xBzruVQv9Sshn34uXtS+gQXarK+cA c7peaEZj6ozKvfn/WagjRl4ZnTGaUB8ARjQ3tcbUaOr/h+skSab+q+IhGl9F5y1IV2GB vHJe/TIS58eN8xEEAWUNPpOKAmp+xYIa44Vy2ZXUhX5W8EK956CXdfYsAE6Fij04ziIl NCzJ7InFeAx6+tSh8OHC4rRNCXjmyGT9gEs908Anvo4B4eEQ8CYt2PafoSrEqO2BfFjU +gX6UJDlmHwaRfN26g3SgqtHDibOGSh8j+tpxBP3zaZrjB5vSo4bFnsdhfgOw7wjsHF6 Iqeg== X-Gm-Message-State: AOAM533mb7f0oLx1UaPJSDEoIIs0684sO4rT5Uts+alwWwU3pGSrqF95 //akHPd8Ocsb1fDnSLlsFDsNGlAlxq5YmasFk+lGlIhAal2lBQ== X-Google-Smtp-Source: ABdhPJyyWoR2M6yesLyC4ruz1ynxeXZtbQ8f3q4trErTa1fFt4DipX9qgE5kIamPsgNga/Tpxmq7tK6Xw+hczLWJMxE= X-Received: by 2002:a1f:46c4:: with SMTP id t187mr8797191vka.10.1630184530809; Sat, 28 Aug 2021 14:02:10 -0700 (PDT) List-Id: Discussion of git use in the FreeBSD project List-Archive: https://lists.freebsd.org/archives/freebsd-git List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-git@freebsd.org MIME-Version: 1.0 References: <20210828204434.n45rsndnehy2tsnb@t480.local> In-Reply-To: <20210828204434.n45rsndnehy2tsnb@t480.local> From: Warner Losh Date: Sat, 28 Aug 2021 15:02:00 -0600 Message-ID: Subject: Re: Phabricator workflow with Git To: "Danilo G. Baio" Cc: freebsd-git Content-Type: multipart/alternative; boundary="000000000000e0a46405caa4e912" X-Rspamd-Queue-Id: 4Gxptd208dz3DvV X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: Y --000000000000e0a46405caa4e912 Content-Type: text/plain; charset="UTF-8" Wow! That's convoluted. On Sat, Aug 28, 2021 at 2:44 PM Danilo G. Baio wrote: > Hi. > > I'm currently using this workflow: > > - - - - - - - - - - - - - - - - - - - - - - - - - > > // Create a new branch > $ git checkout -b FEATURE > > // Change stuff and git commit > // Note that you already can include the Review information in > // Phabricator format. > > ``` > <> > > Summary: > > Test Plan: > > Reviewers: > > Subscribers: > ``` > > // Open a review with the first commit > $ arc diff --create HEAD~ > > > // If it's accepted, fix the commit log message, rebase with main > // branch, and push > All that's replaced by 'git arc create HEAD' > $ git commit --amend > $ git rebase -i main > $ git push remote_name FEATURE:main > git arc stage. This also takes care of adding differential revision, etc. will stage it into main, then you can just 'git push freebsd' to put it in the the tree. > // If it's NOT accepted > // Change stuff and add a second git commit > > // Update review with the two commits > $ arc diff --update DXXXXX HEAD~2 > git arc update does this automatically. > // If it's accepted, you can soft reset both commits and do a new one > // or, just use `git merge and squash`. > > // merge/squash way > // Set the second commit to be squashed > > $ git rebase -i main > > ``` > pick 954c5d4626 Readme: First commit > squash 7231873f23 Makefile: Second commit > ``` > > or > > $ git reset --soft HEAD~2 > // And add a final commit > I'd document only rebase. The git reset workflow is somewhat more dangerous and error-prone. // Submit > $ git push remote_name FEATURE:main > git arc stage git push is what I use, but I know lots of people like the branch:main notation. It's harder to use, though when you lose the race. If you stage on main, then git pull --rebase will do the right thing in one step rather than several. > // Delete FEATURE branch > > $ git checkout main > $ git pull origin main --no-ff > --ff-only don't you mean? You *NEVER* want a non-ff pull with upstream. Ever. It leads to great evil and lost changes. > $ git branch -d FEATURE > Yea, this is what I use, but I have a script that does this over all the branches.... > I know there are git-arc (tools/tools/git-arc) on base, but I still > didn't use it. > We should only document it, since it hides all this ugliness and makes things easier, less tedious and less error-prone. > I just want to check if there are other ways to do that (that you > recommend), or if can I document it, at least for now, on our > Phabricator Wiki page [1]. > > > 1 - https://wiki.freebsd.org/Phabricator While you can document what you've said, I found it somewhat confusing to follow, especially relative to git arc. Warner --000000000000e0a46405caa4e912-- From nobody Sat Aug 28 21:48:53 2021 X-Original-To: freebsd-git@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 D594917AD6DF for ; Sat, 28 Aug 2021 21:48:58 +0000 (UTC) (envelope-from dbaio@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GxqwV5Rrpz3h11; Sat, 28 Aug 2021 21:48:58 +0000 (UTC) (envelope-from dbaio@FreeBSD.org) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com [66.111.4.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: dbaio/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 9D950CE09; Sat, 28 Aug 2021 21:48:58 +0000 (UTC) (envelope-from dbaio@FreeBSD.org) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailauth.nyi.internal (Postfix) with ESMTP id 60C3527C0054; Sat, 28 Aug 2021 17:48:58 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Sat, 28 Aug 2021 17:48:58 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudduiedgtdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkfhggtggujgesghdtre ertddtvdenucfhrhhomhepfdffrghnihhlohcuifdruceurghiohdfuceouggsrghiohes hfhrvggvuefuffdrohhrgheqnecuggftrfgrthhtvghrnhepieefjeeujedtveeigfetue eggeeftdejueetleekueegleekvedvffffhedtheeknecuffhomhgrihhnpehfrhgvvggs shgurdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepuggsrghiohdomhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidquddukedu feeluddvtddqvdeikedtvdejieekqdgusggrihhopeephfhrvggvuefuffdrohhrghesfh grshhtmhgrihhlrdgtohhm X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 28 Aug 2021 17:48:57 -0400 (EDT) Date: Sat, 28 Aug 2021 18:48:53 -0300 From: "Danilo G. Baio" To: Warner Losh Cc: freebsd-git Subject: Re: Phabricator workflow with Git Message-ID: <20210828214853.vbo7kh5fo5n5nrdn@t480.local> References: <20210828204434.n45rsndnehy2tsnb@t480.local> List-Id: Discussion of git use in the FreeBSD project List-Archive: https://lists.freebsd.org/archives/freebsd-git List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-git@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="pacsgcql5ee3p3ay" Content-Disposition: inline In-Reply-To: X-ThisMailContainsUnwantedMimeParts: N --pacsgcql5ee3p3ay Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Aug 28, 2021 at 03:02:00PM -0600, Warner Losh wrote: > Wow! That's convoluted. /me hides >=20 > On Sat, Aug 28, 2021 at 2:44 PM Danilo G. Baio wrote: >=20 > > Hi. > > > > I'm currently using this workflow: > > > > - - - - - - - - - - - - - - - - - - - - - - - - - > > > > // Create a new branch > > $ git checkout -b FEATURE > > > > // Change stuff and git commit > > // Note that you already can include the Review information in > > // Phabricator format. > > > > ``` > > <> > > > > Summary: > > > > Test Plan: > > > > Reviewers: > > > > Subscribers: > > ``` > > > > // Open a review with the first commit > > $ arc diff --create HEAD~ > > > > > > // If it's accepted, fix the commit log message, rebase with main > > // branch, and push > > >=20 > All that's replaced by 'git arc create HEAD' >=20 >=20 > > $ git commit --amend > > $ git rebase -i main > > $ git push remote_name FEATURE:main > > >=20 > git arc stage. This also takes care of adding differential revision, etc. >=20 > will stage it into main, then you can just 'git push freebsd' to put it in > the the tree. >=20 >=20 > > // If it's NOT accepted > > // Change stuff and add a second git commit > > > > // Update review with the two commits > > $ arc diff --update DXXXXX HEAD~2 > > >=20 > git arc update >=20 > does this automatically. >=20 >=20 > > // If it's accepted, you can soft reset both commits and do a new one > > // or, just use `git merge and squash`. > > > > // merge/squash way > > // Set the second commit to be squashed > > > > $ git rebase -i main > > > > ``` > > pick 954c5d4626 Readme: First commit > > squash 7231873f23 Makefile: Second commit > > ``` > > > > or > > > > $ git reset --soft HEAD~2 > > // And add a final commit > > >=20 > I'd document only rebase. The git reset workflow is somewhat more dangero= us > and error-prone. >=20 > // Submit > > $ git push remote_name FEATURE:main > > >=20 > git arc stage > git push >=20 > is what I use, but I know lots of people like the branch:main notation. > It's harder to use, though when you lose the race. If you stage on main, > then git pull --rebase will do the right thing in one step rather than > several. >=20 >=20 > > // Delete FEATURE branch > > > > $ git checkout main > > $ git pull origin main --no-ff > > >=20 > --ff-only don't you mean? You *NEVER* want a non-ff pull with upstream. > Ever. It leads to great evil and lost changes. >=20 Yes, sorry. >=20 > > $ git branch -d FEATURE > > >=20 > Yea, this is what I use, but I have a script that does this over all the > branches.... >=20 >=20 > > I know there are git-arc (tools/tools/git-arc) on base, but I still > > didn't use it. > > >=20 > We should only document it, since it hides all this ugliness and makes > things easier, less tedious and less error-prone. >=20 >=20 > > I just want to check if there are other ways to do that (that you > > recommend), or if can I document it, at least for now, on our > > Phabricator Wiki page [1]. > > > > > > 1 - https://wiki.freebsd.org/Phabricator >=20 >=20 > While you can document what you've said, I found it somewhat confusing to > follow, especially relative > to git arc. >=20 > Warner Glad that I sent this message here. So, I'll test/use `git arc`. Is there anything written about it elsewhere? Thank you for the prompt reply and the tips. Regards. --=20 Danilo G. Baio (dbaio) --pacsgcql5ee3p3ay Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAABCgB9FiEEORj0UTsjzCy+enIkmpN7LfMuiNcFAmEqr0JfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDM5 MThGNDUxM0IyM0NDMkNCRTdBNzIyNDlBOTM3QjJERjMyRTg4RDcACgkQmpN7LfMu iNdsYRAAsYuidoMzBe6YQrqLjerTWXdG8P3xALBT+1qc+iJLcjHA4ayYcAugQkgf oa9Pui7c3j5ISji0QbSploWvblzU5JGbqkgmX5aj6LiLsVmPc/KDeWYafJ0Zyx7Y JQzq83mdzBeOryioHEQb1DH3xdG5YP6uGH3cyZQM0aU4YsYif5d+7dP6+fty1aQe QaqNxbcBoEM5VsDLwOFaj4SszXybKDL/FgQ3IFSpGp4dG7FUgXNLmDsUb5mtZ13V nxbRIoKZGacQUE4rv5Rgo+gzogidwdSa0n6iR/3EXDNC8GCtu0bLsDEUjzUB5pGY YER9foMVzfoLH/BKtLt7kJYGaSLE0GOBEegLEt+eC/vSl8jaDxqESESXxb1qs5AX lS39aPRabqarWOxgu1iQiqFgqjkzavuLv2x9ixJtsD/M8eVRYzoq6fHw2Mhr5CiQ rm7Kh98U2eFSzFr4sDuhDfLT4KdvAK0xepufuIjRS3Mou+/Qd3FFV7TpH3MjKVI/ SJNWSJ5dCirregXCcy+h5ALRLLJOgXGnKS7PWVSGw21vICDCfNHyYIWN7UdNoX45 NSysu2Ztyabhcu/FAWXwAO1/EFoqeF6sGdo885f0Hy+WQ0i16YvFLMgCqblmutxY 1PAHpSrDD+OH5cuML+7NEescFqE6uZ/R3hL8uYGx0ajl26CFs0E= =cyOM -----END PGP SIGNATURE----- --pacsgcql5ee3p3ay-- From nobody Sat Aug 28 22:02:33 2021 X-Original-To: freebsd-git@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 DC6D3178B599 for ; Sat, 28 Aug 2021 22:02:40 +0000 (UTC) (envelope-from rob.fx907@gmail.com) Received: from mail-oo1-xc30.google.com (mail-oo1-xc30.google.com [IPv6:2607:f8b0:4864:20::c30]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GxrDJ3yHLz3lfD; Sat, 28 Aug 2021 22:02:40 +0000 (UTC) (envelope-from rob.fx907@gmail.com) Received: by mail-oo1-xc30.google.com with SMTP id b5-20020a4ac285000000b0029038344c3dso3235791ooq.8; Sat, 28 Aug 2021 15:02:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Nv7GtXdu/j6PywLzojtw0NL18CSp6swB95wQKXbThBE=; b=Pre+9D/cNvPJ9XxXbk/gHDTr0uhe+VVMtiEPHYqwaDoTuCeDOER2FFthG05ZrO5Ew/ MkKEYBGDhWe3Kh8NM3A5gREYpvHKtQWr8yOuhJoDIV/6o/691QvCvJrlPZi0xgL9UI2U gM5fQQC7RVHiWa+3GberVNbw3VX7g+bcRBTEURD1suAmoxmYr5AKOEB2iPHdKnFhtnIt h6wenOkwAyHHUD/9WZW2A1hzaIZdICgZxpnwxoSAOfRzW03ZZZezGhQ5LiXm0VGT0gzf Ge7uAE/oTfUHNwa7+51EKgEeFrdbiZUO1JOWj7mLHOXVKKLtDa/aqRyv4TJuM0bZTai2 OciA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Nv7GtXdu/j6PywLzojtw0NL18CSp6swB95wQKXbThBE=; b=JCvmB6i6yEfLrTd4XUgh7ci8o24LPYDKg8Dz7jCxiKQ5gvqas+wIkqCZnhKk57v4J/ Ch5E1OOpFASlEnTPwMtDjLvmAcGxTq0CVeo2Sl4NwxQBVgGa8AGP8KjqnesXmRUAmJES nCeXYApHWwwx3EIOa9MN3Dr0sbut0Fxu04A4K4P4ioSRB45+psOWyQEHcpbOolwLhV8b 49kpHginKyp6fhBekrndFV8znmMgzJeiQCFORyuPizZk+/QldiTeHMhdb1twJR7Y7O8Z YjfRbVOtukQ+OUthArogkJBRi4YnD56IC7xhmGPY9ky8L0gjXXkKpeFrVr21HEKbZn39 CWnA== X-Gm-Message-State: AOAM532n6CnTJPoaEmtecBsrk7ORC0ApPy145cBjC38sZRVh766YYEcH cHvOWdEHvTPBnTwLx7SiPvE8r6KbHOz+sd67pPBZ84faAvU= X-Google-Smtp-Source: ABdhPJz6x/KwuahDfVX3Gd/E4A3iBFb3puoF4JDjXTvM4u2FY8yp+wpKZ+ErK35VmiZatciTdVXcXZD3kH9J9dil9zI= X-Received: by 2002:a4a:b34c:: with SMTP id n12mr4681359ooo.19.1630188153608; Sat, 28 Aug 2021 15:02:33 -0700 (PDT) List-Id: Discussion of git use in the FreeBSD project List-Archive: https://lists.freebsd.org/archives/freebsd-git List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-git@freebsd.org MIME-Version: 1.0 Received: by 2002:ac9:704d:0:0:0:0:0 with HTTP; Sat, 28 Aug 2021 15:02:33 -0700 (PDT) In-Reply-To: <20210828214853.vbo7kh5fo5n5nrdn@t480.local> References: <20210828204434.n45rsndnehy2tsnb@t480.local> <20210828214853.vbo7kh5fo5n5nrdn@t480.local> From: Rob Wing Date: Sat, 28 Aug 2021 14:02:33 -0800 Message-ID: Subject: Re: Phabricator workflow with Git To: "Danilo G. Baio" Cc: Warner Losh , freebsd-git Content-Type: multipart/alternative; boundary="000000000000d01e4d05caa5c181" X-Rspamd-Queue-Id: 4GxrDJ3yHLz3lfD X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; TAGGED_FROM(0.00)[]; REPLY(-4.00)[] X-Spam: Yes X-ThisMailContainsUnwantedMimeParts: Y --000000000000d01e4d05caa5c181 Content-Type: text/plain; charset="UTF-8" I think you can: cd tools/tools/git make install Then open up the man page: man git-arc On Saturday, August 28, 2021, Danilo G. Baio wrote: > On Sat, Aug 28, 2021 at 03:02:00PM -0600, Warner Losh wrote: > > Wow! That's convoluted. > > /me hides > > > > > On Sat, Aug 28, 2021 at 2:44 PM Danilo G. Baio > wrote: > > > > > Hi. > > > > > > I'm currently using this workflow: > > > > > > - - - - - - - - - - - - - - - - - - - - - - - - - > > > > > > // Create a new branch > > > $ git checkout -b FEATURE > > > > > > // Change stuff and git commit > > > // Note that you already can include the Review information in > > > // Phabricator format. > > > > > > ``` > > > <> > > > > > > Summary: > > > > > > Test Plan: > > > > > > Reviewers: > > > > > > Subscribers: > > > ``` > > > > > > // Open a review with the first commit > > > $ arc diff --create HEAD~ > > > > > > > > > // If it's accepted, fix the commit log message, rebase with main > > > // branch, and push > > > > > > > All that's replaced by 'git arc create HEAD' > > > > > > > $ git commit --amend > > > $ git rebase -i main > > > $ git push remote_name FEATURE:main > > > > > > > git arc stage. This also takes care of adding differential revision, etc. > > > > will stage it into main, then you can just 'git push freebsd' to put it > in > > the the tree. > > > > > > > // If it's NOT accepted > > > // Change stuff and add a second git commit > > > > > > // Update review with the two commits > > > $ arc diff --update DXXXXX HEAD~2 > > > > > > > git arc update > > > > does this automatically. > > > > > > > // If it's accepted, you can soft reset both commits and do a new one > > > // or, just use `git merge and squash`. > > > > > > // merge/squash way > > > // Set the second commit to be squashed > > > > > > $ git rebase -i main > > > > > > ``` > > > pick 954c5d4626 Readme: First commit > > > squash 7231873f23 Makefile: Second commit > > > ``` > > > > > > or > > > > > > $ git reset --soft HEAD~2 > > > // And add a final commit > > > > > > > I'd document only rebase. The git reset workflow is somewhat more > dangerous > > and error-prone. > > > > // Submit > > > $ git push remote_name FEATURE:main > > > > > > > git arc stage > > git push > > > > is what I use, but I know lots of people like the branch:main notation. > > It's harder to use, though when you lose the race. If you stage on main, > > then git pull --rebase will do the right thing in one step rather than > > several. > > > > > > > // Delete FEATURE branch > > > > > > $ git checkout main > > > $ git pull origin main --no-ff > > > > > > > --ff-only don't you mean? You *NEVER* want a non-ff pull with upstream. > > Ever. It leads to great evil and lost changes. > > > > > Yes, sorry. > > > > > > $ git branch -d FEATURE > > > > > > > Yea, this is what I use, but I have a script that does this over all the > > branches.... > > > > > > > I know there are git-arc (tools/tools/git-arc) on base, but I still > > > didn't use it. > > > > > > > We should only document it, since it hides all this ugliness and makes > > things easier, less tedious and less error-prone. > > > > > > > I just want to check if there are other ways to do that (that you > > > recommend), or if can I document it, at least for now, on our > > > Phabricator Wiki page [1]. > > > > > > > > > 1 - https://wiki.freebsd.org/Phabricator > > > > > > While you can document what you've said, I found it somewhat confusing to > > follow, especially relative > > to git arc. > > > > Warner > > > > Glad that I sent this message here. > > So, I'll test/use `git arc`. > > Is there anything written about it elsewhere? > > Thank you for the prompt reply and the tips. > > Regards. > -- > Danilo G. Baio (dbaio) > --000000000000d01e4d05caa5c181-- From nobody Sat Aug 28 22:04:38 2021 X-Original-To: freebsd-git@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 7ABEC178D1B5 for ; Sat, 28 Aug 2021 22:04:55 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ua1-x92b.google.com (mail-ua1-x92b.google.com [IPv6:2607:f8b0:4864:20::92b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GxrGv2m3Fz3mt9 for ; Sat, 28 Aug 2021 22:04:55 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-ua1-x92b.google.com with SMTP id y36so5507346uad.7 for ; Sat, 28 Aug 2021 15:04:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ziOe25zmLmAkGprx1GLiHe4Ub0PIvxk3lIRDyE5Hki0=; b=KQkl6D7gL4lCsswgDv0oTLetA9Ru5Gz1dTqmAc8V8mjryd1Wy+LvOXNHIBZGRT0Fcd uW4O0BfLSSVl/mlbc603YAwzvT+OoYZfEvDFGvRrq8pn5fk04/40nigVntjQ8HmxCC+x tgeO+oroMuAbK4XqGxJn4W1aN4uScq3zenh7V9I3tHXj9GHFd32i4NspCJLOftmrhNgf Q7uRyWzKRCBYtfrBJEEx8jojmPXVhSvBejpxkhTLAMfT8BSnlWXFHpEx2lfmep5e/olG UxrikZR4J5nlHQC9edFoSwvKkPlkDLkjZhIRY4XyC53+c/SqR04QayQMdxG+0qfyP9Ey TwtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ziOe25zmLmAkGprx1GLiHe4Ub0PIvxk3lIRDyE5Hki0=; b=c70g08voNwNKEu53NdHc5jDrVGi0YuKFolvp050K/JHEbWCCqod1DvJfvZI1Vc1WOh yki7Ibdj+i9r8Ma5DaEa3FFmZqnNElZqbrhq7m0wbu4NjgaRYfDVrN3wlS1W/llY/ASX mskyVycgddX0SLeFf7MvbA56CQfVHnG5UGTkRwYHydAxZ7/wW5R+JdPOtSQPqcdPZuuV nKeMRNXUgEoT+BDHErBtto8U4xccAnXhOsgTX/kAZZkDRwhVTd7Cjo3IBf67zl4pofQo e9siupS3q+NuZ3/FSsi/qzXLZp6U5vYz/vWQqeudM0Dt0iTk9RwiOci2DrHpkN1LMUcF R31Q== X-Gm-Message-State: AOAM533qSHLgsiYZHk9IIqA7TzD91ya8couzxxaljP3sgN6LtcR47O5c JiTzeOm7Wd3MV2ffbbD2RUOGuzabpXH9woJcxYTzqd5iH4ZKbg== X-Google-Smtp-Source: ABdhPJxMx9xetM40ElnA9Aun+Aca+FI4faMkDCyMksz8sCJYn1puKq+6LevJeyaurwbCKA6IP2RyY+jCgMrlKyMBhXk= X-Received: by 2002:a9f:31c8:: with SMTP id w8mr11711375uad.77.1630188289086; Sat, 28 Aug 2021 15:04:49 -0700 (PDT) List-Id: Discussion of git use in the FreeBSD project List-Archive: https://lists.freebsd.org/archives/freebsd-git List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-git@freebsd.org MIME-Version: 1.0 References: <20210828204434.n45rsndnehy2tsnb@t480.local> <20210828214853.vbo7kh5fo5n5nrdn@t480.local> In-Reply-To: <20210828214853.vbo7kh5fo5n5nrdn@t480.local> From: Warner Losh Date: Sat, 28 Aug 2021 16:04:38 -0600 Message-ID: Subject: Re: Phabricator workflow with Git To: "Danilo G. Baio" Cc: freebsd-git Content-Type: multipart/alternative; boundary="000000000000e36cff05caa5c963" X-Rspamd-Queue-Id: 4GxrGv2m3Fz3mt9 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: Y --000000000000e36cff05caa5c963 Content-Type: text/plain; charset="UTF-8" On Sat, Aug 28, 2021 at 3:48 PM Danilo G. Baio wrote: > On Sat, Aug 28, 2021 at 03:02:00PM -0600, Warner Losh wrote: > > Wow! That's convoluted. > > /me hides > Sorry, I guess I wasn't as kind at pointing out improvements to this as I could have been. Sorry about that. Warner > > > > On Sat, Aug 28, 2021 at 2:44 PM Danilo G. Baio > wrote: > > > > > Hi. > > > > > > I'm currently using this workflow: > > > > > > - - - - - - - - - - - - - - - - - - - - - - - - - > > > > > > // Create a new branch > > > $ git checkout -b FEATURE > > > > > > // Change stuff and git commit > > > // Note that you already can include the Review information in > > > // Phabricator format. > > > > > > ``` > > > <> > > > > > > Summary: > > > > > > Test Plan: > > > > > > Reviewers: > > > > > > Subscribers: > > > ``` > > > > > > // Open a review with the first commit > > > $ arc diff --create HEAD~ > > > > > > > > > // If it's accepted, fix the commit log message, rebase with main > > > // branch, and push > > > > > > > All that's replaced by 'git arc create HEAD' > > > > > > > $ git commit --amend > > > $ git rebase -i main > > > $ git push remote_name FEATURE:main > > > > > > > git arc stage. This also takes care of adding differential revision, etc. > > > > will stage it into main, then you can just 'git push freebsd' to put it > in > > the the tree. > > > > > > > // If it's NOT accepted > > > // Change stuff and add a second git commit > > > > > > // Update review with the two commits > > > $ arc diff --update DXXXXX HEAD~2 > > > > > > > git arc update > > > > does this automatically. > > > > > > > // If it's accepted, you can soft reset both commits and do a new one > > > // or, just use `git merge and squash`. > > > > > > // merge/squash way > > > // Set the second commit to be squashed > > > > > > $ git rebase -i main > > > > > > ``` > > > pick 954c5d4626 Readme: First commit > > > squash 7231873f23 Makefile: Second commit > > > ``` > > > > > > or > > > > > > $ git reset --soft HEAD~2 > > > // And add a final commit > > > > > > > I'd document only rebase. The git reset workflow is somewhat more > dangerous > > and error-prone. > > > > // Submit > > > $ git push remote_name FEATURE:main > > > > > > > git arc stage > > git push > > > > is what I use, but I know lots of people like the branch:main notation. > > It's harder to use, though when you lose the race. If you stage on main, > > then git pull --rebase will do the right thing in one step rather than > > several. > > > > > > > // Delete FEATURE branch > > > > > > $ git checkout main > > > $ git pull origin main --no-ff > > > > > > > --ff-only don't you mean? You *NEVER* want a non-ff pull with upstream. > > Ever. It leads to great evil and lost changes. > > > > > Yes, sorry. > > > > > > $ git branch -d FEATURE > > > > > > > Yea, this is what I use, but I have a script that does this over all the > > branches.... > > > > > > > I know there are git-arc (tools/tools/git-arc) on base, but I still > > > didn't use it. > > > > > > > We should only document it, since it hides all this ugliness and makes > > things easier, less tedious and less error-prone. > > > > > > > I just want to check if there are other ways to do that (that you > > > recommend), or if can I document it, at least for now, on our > > > Phabricator Wiki page [1]. > > > > > > > > > 1 - https://wiki.freebsd.org/Phabricator > > > > > > While you can document what you've said, I found it somewhat confusing to > > follow, especially relative > > to git arc. > > > > Warner > > > > Glad that I sent this message here. > > So, I'll test/use `git arc`. > > Is there anything written about it elsewhere? > > Thank you for the prompt reply and the tips. > > Regards. > -- > Danilo G. Baio (dbaio) > --000000000000e36cff05caa5c963-- From nobody Sat Aug 28 22:18:55 2021 X-Original-To: freebsd-git@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 A71B7179B784 for ; Sat, 28 Aug 2021 22:18:59 +0000 (UTC) (envelope-from dbaio@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gxrb746dQz3qf8; Sat, 28 Aug 2021 22:18:59 +0000 (UTC) (envelope-from dbaio@FreeBSD.org) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com [66.111.4.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: dbaio/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 6FD91D1B4; Sat, 28 Aug 2021 22:18:59 +0000 (UTC) (envelope-from dbaio@FreeBSD.org) Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailauth.nyi.internal (Postfix) with ESMTP id 5EABC27C0054; Sat, 28 Aug 2021 18:18:59 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sat, 28 Aug 2021 18:18:59 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudduiedgtdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkfhggtggujgesghdtre ertddtvdenucfhrhhomhepfdffrghnihhlohcuifdruceurghiohdfuceouggsrghiohes hfhrvggvuefuffdrohhrgheqnecuggftrfgrthhtvghrnhepledvhfefffdvfedtkefhud ffgeetgeeftdeujeefvdeggfdtjefggeehgeevjedvnecuvehluhhsthgvrhfuihiivgep tdenucfrrghrrghmpehmrghilhhfrhhomhepuggsrghiohdomhgvshhmthhprghuthhhph gvrhhsohhnrghlihhthidquddukedufeeluddvtddqvdeikedtvdejieekqdgusggrihho peephfhrvggvuefuffdrohhrghesfhgrshhtmhgrihhlrdgtohhm X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 28 Aug 2021 18:18:57 -0400 (EDT) Date: Sat, 28 Aug 2021 19:18:55 -0300 From: "Danilo G. Baio" To: Rob Wing Cc: Warner Losh , freebsd-git Subject: Re: Phabricator workflow with Git Message-ID: <20210828221855.rbwx35ubxalnaaho@t480.local> References: <20210828204434.n45rsndnehy2tsnb@t480.local> <20210828214853.vbo7kh5fo5n5nrdn@t480.local> List-Id: Discussion of git use in the FreeBSD project List-Archive: https://lists.freebsd.org/archives/freebsd-git List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-git@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="eosdvndazfsla22k" Content-Disposition: inline In-Reply-To: X-ThisMailContainsUnwantedMimeParts: N --eosdvndazfsla22k Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Aug 28, 2021 at 02:02:33PM -0800, Rob Wing wrote: > I think you can: >=20 > cd tools/tools/git > make install >=20 > Then open up the man page: > man git-arc Nice. There is even a HOWTO there. Thanks! --=20 Danilo G. Baio (dbaio) --eosdvndazfsla22k Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAABCgB9FiEEORj0UTsjzCy+enIkmpN7LfMuiNcFAmEqtkxfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDM5 MThGNDUxM0IyM0NDMkNCRTdBNzIyNDlBOTM3QjJERjMyRTg4RDcACgkQmpN7LfMu iNdguA//T8S4Yo4/Adr1Eqt5au4cR1z1TTj4Ehee7q+BQTKLTHg2q1trmPZCdGdc j4wZbpnRYSnvbj4JaKZrI6iffD9wni260/huD6OEYIWJHfqyfZeP7bqv2Hf7auj3 KdtSLsFAnHsfiJAKKyoWGINOcDqLZnxcrltv7Qu8JLW4pqou6SnS43h1rs77y0Bb e7Xv4fr59+htneFq7d6VmUnGKPvRf9nJ/VZCXNqXcFSuhQhYRc+1zpwB0a5N0TNh GEW6TfMKkd7vAe3W08XFNKi69W+OqwVtHsfYVuxOa7Sx/h+yt0M+25MWLy7VswjD GZ9PHgcYQ58R5FaX254IrrJAgyYHF7toquAg5lss9q6JipVl8Nynr9H0lJcnjYv+ hPG3b6J8wpqp8KMJ/ZUIjlNVYs10IER/cy5WA4K0PMx9Iqe9uPEtqf8jgt6ksE2L PWgL3jeMtpHpP62V2ifqjIWRG1g11+xiPcYGRln8Xb1Hln5exwEmzlDZV0ZIHNg4 hGPPMD/6XoM7ll4IcWSOFIxHUhr34yHzk/LdNej4norK/JsAWc70h3e9OLS1nAN/ xmjW5TbFc9tevbVelYY2VXfHIcJLdcDZCZv4ZNuJx5TBGDDr6WMlUHdUb1v/ZaL9 54YC6hPGJyDkC562zrk3QA3bXEd+zEbHX+2pAMwGxUknXKPESmE= =qyz8 -----END PGP SIGNATURE----- --eosdvndazfsla22k-- From nobody Sat Aug 28 22:28:00 2021 X-Original-To: freebsd-git@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 86DAC179E1FA for ; Sat, 28 Aug 2021 22:28:03 +0000 (UTC) (envelope-from dbaio@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gxrnb36ZGz3s3P; Sat, 28 Aug 2021 22:28:03 +0000 (UTC) (envelope-from dbaio@FreeBSD.org) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com [66.111.4.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: dbaio/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4B91AD2F3; Sat, 28 Aug 2021 22:28:03 +0000 (UTC) (envelope-from dbaio@FreeBSD.org) Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailauth.nyi.internal (Postfix) with ESMTP id 4264C27C0054; Sat, 28 Aug 2021 18:28:03 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sat, 28 Aug 2021 18:28:03 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudduiedgudduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkfhggtggujgesghdtre ertddtvdenucfhrhhomhepfdffrghnihhlohcuifdruceurghiohdfuceouggsrghiohes hfhrvggvuefuffdrohhrgheqnecuggftrfgrthhtvghrnhepieefjeeujedtveeigfetue eggeeftdejueetleekueegleekvedvffffhedtheeknecuffhomhgrihhnpehfrhgvvggs shgurdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepuggsrghiohdomhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidquddukedu feeluddvtddqvdeikedtvdejieekqdgusggrihhopeephfhrvggvuefuffdrohhrghesfh grshhtmhgrihhlrdgtohhm X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 28 Aug 2021 18:28:01 -0400 (EDT) Date: Sat, 28 Aug 2021 19:28:00 -0300 From: "Danilo G. Baio" To: Warner Losh Cc: freebsd-git Subject: Re: Phabricator workflow with Git Message-ID: <20210828222800.ifyamklolyzz2vx7@t480.local> References: <20210828204434.n45rsndnehy2tsnb@t480.local> <20210828214853.vbo7kh5fo5n5nrdn@t480.local> List-Id: Discussion of git use in the FreeBSD project List-Archive: https://lists.freebsd.org/archives/freebsd-git List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-git@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="izrn6qracfwy63oh" Content-Disposition: inline In-Reply-To: X-ThisMailContainsUnwantedMimeParts: N --izrn6qracfwy63oh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Aug 28, 2021 at 04:04:38PM -0600, Warner Losh wrote: > On Sat, Aug 28, 2021 at 3:48 PM Danilo G. Baio wrote: >=20 > > On Sat, Aug 28, 2021 at 03:02:00PM -0600, Warner Losh wrote: > > > Wow! That's convoluted. > > > > /me hides > > >=20 > Sorry, I guess I wasn't as kind at pointing out improvements to this as I > could have been. > Sorry about that. >=20 > Warner >=20 Ah don't worry, you helped me a lot. =3D) Thanks! >=20 > > > > > > On Sat, Aug 28, 2021 at 2:44 PM Danilo G. Baio > > wrote: > > > > > > > Hi. > > > > > > > > I'm currently using this workflow: > > > > > > > > - - - - - - - - - - - - - - - - - - - - - - - - - > > > > > > > > // Create a new branch > > > > $ git checkout -b FEATURE > > > > > > > > // Change stuff and git commit > > > > // Note that you already can include the Review information in > > > > // Phabricator format. > > > > > > > > ``` > > > > <> > > > > > > > > Summary: > > > > > > > > Test Plan: > > > > > > > > Reviewers: > > > > > > > > Subscribers: > > > > ``` > > > > > > > > // Open a review with the first commit > > > > $ arc diff --create HEAD~ > > > > > > > > > > > > // If it's accepted, fix the commit log message, rebase with main > > > > // branch, and push > > > > > > > > > > All that's replaced by 'git arc create HEAD' > > > > > > > > > > $ git commit --amend > > > > $ git rebase -i main > > > > $ git push remote_name FEATURE:main > > > > > > > > > > git arc stage. This also takes care of adding differential revision, = etc. > > > > > > will stage it into main, then you can just 'git push freebsd' to put = it > > in > > > the the tree. > > > > > > > > > > // If it's NOT accepted > > > > // Change stuff and add a second git commit > > > > > > > > // Update review with the two commits > > > > $ arc diff --update DXXXXX HEAD~2 > > > > > > > > > > git arc update > > > > > > does this automatically. > > > > > > > > > > // If it's accepted, you can soft reset both commits and do a new o= ne > > > > // or, just use `git merge and squash`. > > > > > > > > // merge/squash way > > > > // Set the second commit to be squashed > > > > > > > > $ git rebase -i main > > > > > > > > ``` > > > > pick 954c5d4626 Readme: First commit > > > > squash 7231873f23 Makefile: Second commit > > > > ``` > > > > > > > > or > > > > > > > > $ git reset --soft HEAD~2 > > > > // And add a final commit > > > > > > > > > > I'd document only rebase. The git reset workflow is somewhat more > > dangerous > > > and error-prone. > > > > > > // Submit > > > > $ git push remote_name FEATURE:main > > > > > > > > > > git arc stage > > > git push > > > > > > is what I use, but I know lots of people like the branch:main notatio= n. > > > It's harder to use, though when you lose the race. If you stage on ma= in, > > > then git pull --rebase will do the right thing in one step rather than > > > several. > > > > > > > > > > // Delete FEATURE branch > > > > > > > > $ git checkout main > > > > $ git pull origin main --no-ff > > > > > > > > > > --ff-only don't you mean? You *NEVER* want a non-ff pull with upstrea= m. > > > Ever. It leads to great evil and lost changes. > > > > > > > > > Yes, sorry. > > > > > > > > > $ git branch -d FEATURE > > > > > > > > > > Yea, this is what I use, but I have a script that does this over all = the > > > branches.... > > > > > > > > > > I know there are git-arc (tools/tools/git-arc) on base, but I still > > > > didn't use it. > > > > > > > > > > We should only document it, since it hides all this ugliness and makes > > > things easier, less tedious and less error-prone. > > > > > > > > > > I just want to check if there are other ways to do that (that you > > > > recommend), or if can I document it, at least for now, on our > > > > Phabricator Wiki page [1]. > > > > > > > > > > > > 1 - https://wiki.freebsd.org/Phabricator > > > > > > > > > While you can document what you've said, I found it somewhat confusin= g to > > > follow, especially relative > > > to git arc. > > > > > > Warner > > > > > > > > Glad that I sent this message here. > > > > So, I'll test/use `git arc`. > > > > Is there anything written about it elsewhere? > > > > Thank you for the prompt reply and the tips. > > > > Regards. > > -- > > Danilo G. Baio (dbaio) > > --=20 Danilo G. Baio (dbaio) --izrn6qracfwy63oh Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAABCgB9FiEEORj0UTsjzCy+enIkmpN7LfMuiNcFAmEquHBfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDM5 MThGNDUxM0IyM0NDMkNCRTdBNzIyNDlBOTM3QjJERjMyRTg4RDcACgkQmpN7LfMu iNfUVA//Qv+1VHoQAbc7wuT40GrwAhOG6w5koR0wVtx700C8OB2ON3elYsW0nei0 RL58t5UraGxjqDXFVBySfxerDD07K2UKlgS8QKn8pidR3GEeqwbjQuXzrJrXaNH8 FagGHvaB5OWrAoNGayjtXod3huEjCmJApOUN1VK5bEm7n0Hdun2ivEW+dRFmzxIU BLxsgICKbpkZFX4XU/ARCfaVROnJAuRim3TLJPYXz7TRFvbHVBQkkPHQsaErAUga mmhBeCsy2bZWGrdJ/d7IyksflJu9E93en21RAB1nBCoJ5naMlmBUvWAladdTt5MV C5B1w3di2elLjhDweTNl6XPLc63QQKbL09W4plwFItBN7wflDCVpAiGkYQQDSMSE yzwEHkd46p1pR58QMV3qvwATFR5m30otNA6rGUCIrWbAF0mtuPRJtxrUlqW0HZMM aLYIOnM/d1jSKOdUfe1P1TR7fRY1TdPUMUeccfepnv9pgbm4vW3Y8PPKCI/pb7yZ IQ22J4JS1+Y9xMbTa/HTt1lX40Gru7le+W93dH4U1J83TR64NjWsVSBU/bUI3b7o +u63/s0VpklO9/mcba7CQTOsF0jSVqCZWgnRcn9N/CwyfYSSSjqrRtnAPzbhVyOh ddoWbb5gAioGjEukLmfEXp9AQhTI8SB1UByGeDeUmIyfYrJYMw8= =bKQF -----END PGP SIGNATURE----- --izrn6qracfwy63oh--