From owner-freebsd-questions@freebsd.org Wed Mar 3 15:10:25 2021 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6C0FE56D4FB; Wed, 3 Mar 2021 15:10:25 +0000 (UTC) (envelope-from trashcan@ellael.org) Received: from mx2.enfer-du-nord.net (mx2.enfer-du-nord.net [87.98.149.189]) (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 mx1.freebsd.org (Postfix) with ESMTPS id 4DrHVm4xTVz3t5Y; Wed, 3 Mar 2021 15:10:24 +0000 (UTC) (envelope-from trashcan@ellael.org) Received: from [IPv6:2003:fb:4f00:8801:2dc2:4515:6bed:5514] (p200300FB4F0088012DC245156bed5514.dip0.t-ipconnect.de [IPv6:2003:fb:4f00:8801:2dc2:4515:6bed:5514]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx2.enfer-du-nord.net (Postfix) with ESMTPSA id 4DrHVc1yrSzwhs; Wed, 3 Mar 2021 16:10:16 +0100 (CET) From: Michael Grimm Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) Subject: Re: ports and git, first steps Date: Wed, 3 Mar 2021 16:10:15 +0100 References: <6996AB6C-B178-48C2-94D4-1F7D62E59998@ellael.org> To: freebsd-git@freebsd.org, freebsd-questions@freebsd.org In-Reply-To: Message-Id: X-Mailer: Apple Mail (2.3654.60.0.2.21) X-Rspamd-Queue-Id: 4DrHVm4xTVz3t5Y X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of trashcan@ellael.org has no SPF policy when checking 87.98.149.189) smtp.mailfrom=trashcan@ellael.org X-Spamd-Result: default: False [-1.60 / 15.00]; RCVD_TLS_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[87.98.149.189:from]; MV_CASE(0.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; ARC_NA(0.00)[]; AUTH_NA(1.00)[]; DMARC_NA(0.00)[ellael.org]; SPAMHAUS_ZRD(0.00)[87.98.149.189:from:127.0.2.255]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-1.00)[-1.000]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:16276, ipnet:87.98.128.0/17, country:FR]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-git,freebsd-questions] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 15:10:25 -0000 [CC'd to freebsd-questions] Ulrich Sp=C3=B6rlein wrote: > On Tue, 2021-03-02 at 13:23:56 +0100, Michael Grimm wrote: >> I am running STABLE-13 and use poudriere (svn+https) to compile my = ports of interest. >>=20 >> Disclaimer: I do consider myself a newbie with regard to git. >>=20 >> After my migration from svn to git regarding sources, I recently = installed a git repository for ports sources. It is working as expected, = good. >>=20 >> But then I added some local ports to the ports directory, which I = added to .git/info/exclude. Ok, that worked out. >>=20 >> Now I had had to modify the Makefile of www/wordpress like I did = before in the svn ports tree. Now git complained: >>=20 >> mwn> git status >> On branch master >> Your branch is up to date with 'origin/master'. >>=20 >> Changes not staged for commit: >> (use "git add ..." to update what will be committed) >> (use "git restore ..." to discard changes in working = directory) >> modified: www/wordpress/Makefile >>=20 >> It took 3.44 seconds to enumerate untracked files. 'status -uno' >> may speed it up, but you have to be careful not to forget to add >> new files yourself (see 'git help status'). >> no changes added to commit (use "git add" and/or "git commit = -a") >>=20 >> Thus I applied 'git commit': >>=20 >> mwn> git commit -a -m "modified to compile wordpress without = llvm" >> [master 39b5d0652] modified to compile wordpress without llvm >> Committer: admin mer-waases.net >> Your name and email address were configured automatically based >> on your username and hostname. Please check that they are = accurate. >> You can suppress this message by setting them explicitly. Run = the >> following command and follow the instructions in your editor to = edit >> your configuration file: >>=20 >> git config --global =E2=80=94edit >>=20 >> After doing this, you may fix the identity used for this commit = with: >>=20 >> git commit --amend --reset-author >> =09 >> 1 file changed, 1 insertion(+), 1 deletion(-) >>=20 >> Now, 'git status' shows: >>=20 >> mwn> git status >> On branch master >> Your branch is ahead of 'origin/master' by 1 commit. >> (use "git push" to publish your local commits) >>=20 >>=20 >> It took 3.17 seconds to enumerate untracked files. 'status -uno' >> may speed it up, but you have to be careful not to forget to add >> new files yourself (see 'git help status'). >> nothing to commit, working tree clean >>=20 >> Well, that looks fine for a git newbie, But there are some questions = left for me: >>=20 >> 1) Will my commited Makefile become overwritten if the master = Makefile becomes modified in the future? (I hope so) >=20 > No, due to how I think (!) poudriere works, your change should remain. >=20 >> 2) Will all upcoming modifications in = 'remote.origin.url=3Dgit://github.com/freebsd/freebsd-ports.git' be = pulled, >> although 'Your branch is ahead of 'origin/master' by 1 commit.'? >=20 > I think poudriere does a `git pull --rebase` always, which fetches = upstream and then rebases your changes on top. So your local changes = will always be there, but they can of course come into conflict with = upstream changes at which point you'll need to resolve those conflicts. Does anyone know if poudriere is using 'git pull =E2=80=94rebase' as = default? >> 3) Is there a better, more suited way to deal with local = modifications? >=20 > I'm not sure. For SVN I used to have a separate myports ports = collection with the uncommitted changes and I haven't switch to git = ports yet. But I would just have my local diffs "on top" of upstream. Ok, I did create a local port instead, and modified the Makefile there. = Now my modification is no longer leading to the 'issue' mentionend = above. >> 4) In analogy to the recommendations for src and git, I did run 'git = config pull.ff only'. >> Is that wrong when it comes to ports (I do not understand what that = means, yet) >=20 > That might actually be in conflict with the git pull --rebase that = poudriere does. I assume though that the argv addition will overwrite = your config setting. But in any case, for a tree with local changes on = top, ff-only is the wrong choice. Either always git pull --rebase or = maybe you can make rebase the default via that config (instead of -ff). I did remove this setting from .git/config. Now poudriere is the only = process dealing with pulls. > hth Yes, very much appreciated. Thanks and regards, Michael