From nobody Tue Oct 12 16:01:00 2021 X-Original-To: freebsd-current@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 DDEF617FE3CA for ; Tue, 12 Oct 2021 16:01:11 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ua1-x934.google.com (mail-ua1-x934.google.com [IPv6:2607:f8b0:4864:20::934]) (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 4HTL4R5gjqz4Rlq for ; Tue, 12 Oct 2021 16:01:11 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-ua1-x934.google.com with SMTP id u5so19373866uao.13 for ; Tue, 12 Oct 2021 09:01:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=cGBRnEO6bAuyx/V6DnH5kdKP+9wLn3Ne2RU+8BInzMc=; b=EeEmdLJibq8sUK+rk8BAjUnBVnBVP3tio5mxVbMRj6C4wxfcNCEZ1qFz7Jr9ydeD3V ihBOo/JKZTK7iIXfY6z1m38foGUCpSdiWErh3UunBJzVJg4nerM9hA13v+rEkQ9K1vOD ZN3jBQ4nzgpIeMSD99pFRxjEgia1nCX5V2qU+8rtNn9NTK9xHETyG6oxf1j6G5iF9hQ2 z69kHrPUwaNNHUmIq/2mmBLfGPmDx2TvM3u4/bcqq/cnWKgZwZ/9tgJxU3WvvsoCt2+Q jnjg2SuT7T7XjFYoWjt4e/ZJ/EaJE09XZpxsdkR3Cj7c0Beai+109LlTUQYANZ7nzZZo uaeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=cGBRnEO6bAuyx/V6DnH5kdKP+9wLn3Ne2RU+8BInzMc=; b=RBandWbUqucFZ76JYxmEAlWQUyFHt7cbMFPnQ2RBjH28IpcHbjxmAc7jk0PagwF/+s JJlcDoXX6mxSohfFzgVAQMmkWviK61h2rVwNtmA2s2nS7Wv5aNLvbq6Y+PqzbQgWSGvB P8B3GZ3m/7wcawOGJ0cgeioJq32vYiWarQxwUc8X+sp5T6VqlrjHswgFBVvojrsMPymY mNulDMjs5YD33dhROcn/pjfHCc3RelTxJlFBFI8Wepr7zcDs+atQ1qnp+9qZgbPPPxSb 7xNU9qD+pF5mWCq368HYNEVgzJwr6+obX6dCzmK1+HD7s2RQto1gwkQmPSxWevd6/LjA RuhA== X-Gm-Message-State: AOAM531bZdZBLkgzI3ATZrpR9cTdEGkb5Zr7q1CyNb3gOVvbsyB0ExIn d64uFL3BqUQucKYaHECX0v9nmcdmCjuvGIDCpLXeOgz45KI= X-Google-Smtp-Source: ABdhPJyArRJ3sLfF7ObLuG3BEFNTxKnGmmQfuUzP3/ZwrbttgXPzPYYVk2kTfHLGsOMD+bbgrHyyOniEzpUm304C8ww= X-Received: by 2002:a67:fc8b:: with SMTP id x11mr17153539vsp.12.1634054471119; Tue, 12 Oct 2021 09:01:11 -0700 (PDT) List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 References: <20211012173148.1d2f138c@hermann.fritz.box> In-Reply-To: <20211012173148.1d2f138c@hermann.fritz.box> From: Warner Losh Date: Tue, 12 Oct 2021 10:01:00 -0600 Message-ID: Subject: Re: git: "overlay" of own remote-branch on official freebsd-ports repo To: FreeBSD User Cc: FreeBSD CURRENT Content-Type: multipart/alternative; boundary="0000000000004b888805ce29f4e9" X-Rspamd-Queue-Id: 4HTL4R5gjqz4Rlq X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: Y --0000000000004b888805ce29f4e9 Content-Type: text/plain; charset="UTF-8" On Tue, Oct 12, 2021 at 9:32 AM FreeBSD User wrote: > I do not know whether I'm right in this list, but since the subject is > mutual so common > in development and GIT, I have the strong feeling I'm right here. > > Im quite new to git, so apologizes for any inconvenience reading my > question. > > Using poudriere on 14-CURRENT to create a selection of packages also > includes updating > the ports tree on a regular basis. I maintain some "special" ports not > official part of > the FreeBSD ports tree and some other ports are part of those I'm supposed > to maintain. I > keep personally track of the changes in a git repo of my own. > > Now I'd like to "overlay" the official portas repo by that of mine to > include changes. > With SVN, there was no problem to have local changes not overwritten by > regular updates > of the ports tree as long as the specific port in question wasn't updated > by the official > site. In git, this behaviour seems to have changed, any changes I made so > far are gone > after poudriere is adviced to update the tree. > > I'd like to ask how FreeBSD developers and maintainers do the trick. If > there is an > official cookbook fpr maintainers (I haven't found it yet ...), please be > so kind and > refer to it. Any advice is welcome. > tl;dr: branches are cheap and well supported in git. You just make a branch for your local changes, and update that however you see fit. For ports I have like that, I've just created a branch in git. I rebase the branch forward each time I update. For me, though, the branch is mostly uncommitted in upstream changes that may not be ready for some reason... There's two ways to do this. You can just merge, which is OK if you aren't upstreaming the changes, or you can rebase if the changes or a subset of the changes likely will end up in FreeBSD. Others might recommend stash, but I find it too unwieldy for more than a couple of things. So the workflow would be: git clone -o freebsd freebsd-ports cd freebsd-ports git checkout -b hartmann-specials Now, you can use poudriere-ports with the -B hartmann-specials and your local repo as the source of truth. to update cd freebsd-ports git checkout main git pull --rebase # or --ff-only, I use --rebase because I push and it's habit git rebase -i main hartmann-specials Note: if you need to have multiple trees with this branch you are modifying, then a git pull --rebase will let you cope with the forced-pushes this method would require. You can also do it with git merge on hartmann-specials if you don't need to keep the changes separate or you have a lot of downstreams that would get cranky, which doesn't sound like the case here. Warner --0000000000004b888805ce29f4e9--