From owner-freebsd-git@freebsd.org Wed Jan 27 02:04:52 2021 Return-Path: Delivered-To: freebsd-git@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 721F64EA285 for ; Wed, 27 Jan 2021 02:04:52 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic306-21.consmr.mail.gq1.yahoo.com (sonic306-21.consmr.mail.gq1.yahoo.com [98.137.68.84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DQRkW3fXQz4pPP for ; Wed, 27 Jan 2021 02:04:51 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1611713089; bh=Gd9Ym+lKVVgfwMg45VK6NrX2ZVZp4gSDtTVMhDsx9DD=; h=Subject:From:Date:To:From:Subject:Reply-To; b=UGz1RNmTbS84vF2k49Pob7ItX/cDlzuY2zyGFB8wBS6o3bMHKjDXsUEvAYWisHMUu3Hz7geZHXNJGAqX5Szh6SnLPM9i2GnVYCTCJovP4xvmVwb9+pBv147n+AN7h2n/wsGLS+KcMdh43XTCLRwUkufsjmJRltgUEF2g4koFoapJ8tbTvDaFBBWuB/5vxfih1VEw3NzfsF2ZpyAfJmlj61G25FbdQ+ypAzT2uBipdhBx81fxnKb3e04BscCDqiRPY+AnWwoAo0vQdADH0RVTIzM6cfFXFhhWroB/co31ujie+tWu7du9jexm6v8hxAs233POWMQADtDxX/6rhVD/4w== X-YMail-OSG: th4aKzgVM1k3LpVi.UXPoitMFUCLolYUv.DHWqeY1Z9zvA_MteE9Meh2g8amkux u_o5Wgf1Bm1U4dkeCngjTvMa4mo5lN0JsjEkMcKd3RnSrgHHmuFCbdHVlbzqApX60qiB8_gpGbqZ dhAL5_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phsqOcSJtyChkbg3dMLfxYgqC6JDSw6MYm0UPs4KUOw0jtAV544Dw3z gCJ_beD5w9ajxjk2izW49MhBjQoJtKw5YaXlwUsCTTTL3.waxnmJlmnSx59D3FZcCqj6RvJYHvFn oiMld6HiNJ_CvwVWX5hLUcWx_o2Yg_1pkEAaM7Mh7qPVXmrnxgSjrgSvD09hFymYpOze.OYOE.Ft GbBLtXkikEZp39B_gt0vF.3qvoxhBHj7gyWvqDGHRP5h3WdeMUNBnWZsr5YIygzk- Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.gq1.yahoo.com with HTTP; Wed, 27 Jan 2021 02:04:49 +0000 Received: by smtp418.mail.gq1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID ef1dd513a20fcfbf4c30428a6a764167; Wed, 27 Jan 2021 02:04:46 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.40.0.2.32\)) Subject: Re: git setup/usage question From: Mark Millard In-Reply-To: Date: Tue, 26 Jan 2021 18:04:45 -0800 Cc: freebsd-git@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <29570D03-7BDF-4778-8E5A-9CD4E03C4D76@yahoo.com> References: <20210126231347.0d7c5a77@zeta.dino.sk> To: Milan Obuch X-Mailer: Apple Mail (2.3654.40.0.2.32) X-Rspamd-Queue-Id: 4DQRkW3fXQz4pPP X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.50 / 15.00]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; DKIM_TRACE(0.00)[yahoo.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; RBL_DBL_DONT_QUERY_IPS(0.00)[98.137.68.84:from]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; SPAMHAUS_ZRD(0.00)[98.137.68.84:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.68.84:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.68.84:from]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-git] X-BeenThere: freebsd-git@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussion of git use in the FreeBSD project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jan 2021 02:04:52 -0000 On 2021-Jan-26, at 15:15, Mark Millard wrote: > On 2021-Jan-26, at 14:13, Milan Obuch wrote: >=20 >> On Tue, 26 Jan 2021 12:51:43 -0800, Mark Millard >> wrote: >>=20 >>> Milan Obuch freebsd-git at dino.sk wrote on >>> Tue Jan 26 14:10:29 UTC 2021 : >>>=20 >>>> # git clone --config >>>> remote.freebsd.fetch=3D'+refs/notes/*:refs/notes/*' --bare >>>> https://git.freebsd.org/src.git /mnt/src/.git # git -C >>>> /mnt/src/.git worktree add /mnt/src/main main # git -C >>>> /mnt/src/.git worktree add /mnt/src/13 stable/13 # git -C >>>> /mnt/src/.git worktree add /mnt/src/12 stable/12 # git -C >>>> /mnt/src/.git worktree add /mnt/src/11 stable/11 =20 >>> . . . >>>> # git -C /mnt/src/.git merge >>>> fatal: this operation must be run in a work tree >>>>=20 >>>> I am a bit stuck now. What does it mean 'being in a work tree'? >>>> Doing 'cd /mnt/src/main' or similar before git command does not >>>> change anything. I read 'man git-merge' but still no clue. It must >>>> be something simple, I just do not see it. =20 >>>=20 >>> man git reports: >>>=20 >>> -C >>> Run as if git was started in instead of the current >>> working directory. . . . >>>=20 >>> So it looks to me like you need to do one or >>> more of something like: >>>=20 >>> # git -C /mnt/src/main merge >>> # git -C /mnt/src/stable/13 merge >>> # git -C /mnt/src/stable/12 merge >>> # git -C /mnt/src/stable/11 merge >>>=20 >>> /mnt/src/.git is not a working directory. >>>=20 >>=20 >> [ snip ] >>=20 >> Thanks for hints, this does explain a bit from what I see, however >> something is still missing. >=20 > By the way, the modern version of Warner's documentation > is at: >=20 > https://github.com/bsdimp/freebsd-git-docs/ >=20 > and is the basis for the documentation update FreeBSD > will have in this area. >=20 > In the Cloning and Mirroring section of: >=20 > https://github.com/bsdimp/freebsd-git-docs/blob/main/faq.md >=20 > there is a little material about issues with using pare repos. > The Users section basically says that using bare will not be > documented. (I've never tired to use a bare repo.) >=20 >> When I tried what you wrote >>=20 >> # git -C /mnt/src/main merge >>=20 >> or what I made from reading man pages and Git Book referenced in Git >> Primer, >>=20 >> # git -C /mnt/src/.git --work-tree /mnt/src/main merge >>=20 >> all I get is >>=20 >> fatal: No remote for the current branch. >=20 > The "No staged changed migration" section of: >=20 > https://github.com/bsdimp/freebsd-git-docs/blob/main/src-cvt.md >=20 > reports on using the following to clone with the ref/notes related > material included: >=20 > git clone -o freebsd --config = remote.freebsd.fetch=3D'+refs/notes/*:refs/notes/*' = https://git.freebsd.org/src.git freebsd-src >=20 > Note the "-o freebsd" that you did not use. The coning notes > in: >=20 > https://github.com/bsdimp/freebsd-git-docs/blob/main/mini-primer.md >=20 > also use the "-o freebsd" (but not the refs/notes related material). >=20 >> so evidently no merge is actually done. Something in my setup is = wrong >> or missing. It's late here now, tomorrow will be another day to try >> something :) >=20 > I recommend reading: >=20 > https://github.com/bsdimp/freebsd-git-docs/blob/main/mini-primer.md > and: > https://github.com/bsdimp/freebsd-git-docs/blob/main/src-cvt.md >=20 > and in using the conventions documented, such as result from > "-o freebsd". Something that I wonder about your use of -C /mnt/src/.git . . . There is also --git-dir=3D/mnt/src/.git . I wonder if you always should be using -C or if some or all the time you should be using --git-dir=3D QUOTE --git-dir=3D Set the path to the repository (".git" directory). This can = also be controlled by setting the GIT_DIR environment variable. It = can be an absolute path or relative path to current working = directory. Specifying the location of the ".git" directory using this = option (or GIT_DIR environment variable) turns off the repository discovery that tries to find a directory with ".git" = subdirectory (which is how the repository and the top-level of the working = tree are discovered), and tells Git that you are at the top level = of the working tree. If you are not at the top-level directory of = the working tree, you should tell Git where the top-level of the working tree is, with the --work-tree=3D option (or GIT_WORK_TREE environment variable) If you just want to run git as if it was started in = then use git -C . END QUOTE There is also the issue of using =3D or not for the likes of: --work-tree=3D/mnt/src/main or: --git-dir=3D/mnt/src/.git The man page always lists =3D for those two (not for -C use). QUOTE --work-tree=3D Set the path to the working tree. It can be an absolute path = or a path relative to the current working directory. This can also = be controlled by setting the GIT_WORK_TREE environment variable = and the core.worktree configuration variable (see core.worktree = in git- config(1) for a more detailed discussion). END QUOTE =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)