Date: Fri, 15 Sep 2023 17:15:55 +0200 From: Jan Beich <jbeich@FreeBSD.org> To: freebsd-ports@freebsd.org Subject: Re: problem with git-pull Message-ID: <pm2j-qxg4-wny@FreeBSD.org> In-Reply-To: <ZQLK6SwlJJTXCLah@pureos> (Matthias Apitz's message of "Thu, 14 Sep 2023 10:57:13 %2B0200") References: <ZQGAIu39ULBpMSNY@pureos> <7cot-21li-wny@FreeBSD.org> <ZQLK6SwlJJTXCLah@pureos>
next in thread | previous in thread | raw e-mail | index | archive | help
Matthias Apitz <guru@unixarea.de> writes: > El d=C3=ADa mi=C3=A9rcoles, septiembre 13, 2023 a las 11:40:57 +0200, Jan= Beich escribi=C3=B3: > >> There are but not officially[1] supported by ports/ e.g., >>=20 >> $ rm -rf security/wpa_supplicant >> $ git checkout origin/main security/wpa_supplicant >> $ git commit -m '[local] security/wpa_supplicant: sync with "main" branc= h' >>=20 >> or ... > > Thanks, Jan. > > I've tested as a dry run for the next time your first proposal: For a dry run use a checkout that far enough from "main" e.g., $ git worktree add --detach /tmp/test origin/2023Q2 $ cd /tmp/test $ rm -rf security/wpa_supplicant $ git checkout origin/main security/wpa_supplicant Updated 3 paths from b36253a767e7 $ git status M security/wpa_supplicant/Makefile M security/wpa_supplicant/files/patch-src_drivers_driver__bsd.c M security/wpa_supplicant/files/patch-src_l2__packet_l2__packet__freebsd.c Note, "rm -rf" is a workaround for Git not modifying files that don't exist in the target revision. It's mostly to prevent orphaned files from breaking build. > > $ cd ports "git fetch" maybe needed shortly after in order to update "origin" i.e., discover updates on the remote side. > nothing to commit, working tree clean > > What is the purpose of the above 'git commit ...'? It seems to not have > any effect. Avoid many future Git commands being blocked on dirty index e.g., $ git rebase origin error: cannot rebase: Your index contains uncommitted changes. error: Please commit or stash them. $ git merge origin error: Your local changes to the following files would be overwritten by me= rge: security/wpa_supplicant/Makefile security/wpa_supplicant/files/patch-src_= drivers_driver__bsd.c security/wpa_supplicant/files/patch-src_l2__packet_l2= __packet__freebsd.c Merge with strategy ort failed. $ git cherry-pick origin error: your local changes would be overwritten by cherry-pick. hint: commit your changes or stash them to proceed. fatal: cherry-pick failed $ git format-patch -1 --stdout origin | git am fatal: Dirty index: cannot apply patches (dirty: security/wpa_supplicant/Ma= kefile security/wpa_supplicant/files/patch-src_drivers_driver__bsd.c securi= ty/wpa_supplicant/files/patch-src_l2__packet_l2__packet__freebsd.c) $ git am --abort
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?pm2j-qxg4-wny>