From owner-dev-commits-src-all@freebsd.org Thu Apr 29 17:45:29 2021 Return-Path: Delivered-To: dev-commits-src-all@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 C6FD4632088; Thu, 29 Apr 2021 17:45:29 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FWNFP2dGjz4tKY; Thu, 29 Apr 2021 17:45:29 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.66.148.124]) by shaw.ca with ESMTPA id cAUblOaS4uKh3cAUcl67Pm; Thu, 29 Apr 2021 11:30:27 -0600 X-Authority-Analysis: v=2.4 cv=EaOr/NqC c=1 sm=1 tr=0 ts=608aed33 a=Cwc3rblV8FOMdVN/wOAqyQ==:117 a=Cwc3rblV8FOMdVN/wOAqyQ==:17 a=kj9zAlcOel0A:10 a=3YhXtTcJ-WEA:10 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=gu6fZOg2AAAA:8 a=EkcXrb_YAAAA:8 a=r7j9-FYAJdjDD8MJgUkA:9 a=CjuIK1q_8ugA:10 a=YV30ditfemIA:10 a=-FEs8UIgK8oA:10 a=NWVoK91CQyQA:10 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 a=2RSlZUUhi9gRBrsHwhhZ:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 6F9114D6; Thu, 29 Apr 2021 10:30:24 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.16.1/8.16.1) with ESMTP id 13THUOv6006096; Thu, 29 Apr 2021 10:30:24 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202104291730.13THUOv6006096@slippy.cwsent.com> X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Michael Gmelin cc: Cy Schubert , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: a0358e3d5184 - main - Synch index of contrib/bc with what is in workdir after cloning. In-reply-to: <20210429172122.1751663f@bsd64.grem.de> References: <202104291234.13TCYk5K092776@gitrepo.freebsd.org> <202104291353.13TDrIg3026309@slippy.cwsent.com> <20210429162959.16662d66@bsd64.grem.de> <202104291455.13TEtxEg040285@slippy.cwsent.com> <20210429172122.1751663f@bsd64.grem.de> Comments: In-reply-to Michael Gmelin message dated "Thu, 29 Apr 2021 17:21:22 +0200." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 29 Apr 2021 10:30:24 -0700 X-CMAE-Envelope: MS4xfLL8XmuT9FZ6bdOs6kAHp1qyASLG7de7B23mhMhgF6rfQnVKJKrflrQMNRRdG+UfgE5MBSw6PESHEqOUFu5WTL56BYkSJuVUaEABgvOurHTvEAXLKZd2 3n9AvtbcOiukloqzY5UojXoL/OpsKL9rm8Ym9aHZBj3qheO0+4/ktwbTg70TzCrgGB0KNuabUjD/3sdR3FxkcRt0LUv0kHHeRBZ/lOASgeVKWQ95XNNmPu+0 NVCW6g7BYRVwL2WnGBjDJH5YiBC9NvoBuQ3x/u5xytI7Qe54ksAXJMeWgn73PVM2SopBEcdvobqeXVcRhzDL6jc0FNbp2ZeMstNCWvVdi6o= X-Rspamd-Queue-Id: 4FWNFP2dGjz4tKY X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Apr 2021 17:45:29 -0000 In message <20210429172122.1751663f@bsd64.grem.de>, Michael Gmelin writes: > > > > On Thu, 29 Apr 2021 07:55:58 -0700 > Cy Schubert wrote: > > > In message <20210429162959.16662d66@bsd64.grem.de>, Michael Gmelin > > writes: > > > > > > > > > > > > On Thu, 29 Apr 2021 06:53:18 -0700 > > > Cy Schubert wrote: > > > > > > > In message <202104291234.13TCYk5K092776@gitrepo.freebsd.org>, > > > > Michael Gmelin wr > > > > ites: > > > > > The branch main has been updated by grembo (ports committer): > > > > > > > > > > URL: > > > > > https://cgit.FreeBSD.org/src/commit/?id=a0358e3d5184950b4316f105eb292 > cba > > > > > fdea208b > > > > > > > > > > commit a0358e3d5184950b4316f105eb292cbafdea208b > > > > > Author: Michael Gmelin > > > > > AuthorDate: 2021-04-29 12:29:04 +0000 > > > > > Commit: Michael Gmelin > > > > > CommitDate: 2021-04-29 12:33:56 +0000 > > > > > > > > > > Synch index of contrib/bc with what is in workdir after > > > > > cloning. > > > > > From a workdir perspective this should be a no-op. > > > > > See also: > > > > > https://lists.freebsd.org/pipermail/freebsd-current/2021-April/07 > 9569 > > > > > > > > .htm > > > > > l > > > > > --- > > > > > contrib/bc/bc.vcxproj | 554 > > > > > ++++++++++++++++++++------------------- -- > > > > > contrib/bc/bc.vcxproj.filters | 362 > > > > > +++++++++++++-------------- contrib/bc/bcl.vcxproj | > > > > > 320 ++++++++++++------------ contrib/bc/bcl.vcxproj.filters | > > > > > 190 +++++++------- 4 files changed, 713 insertions(+), 713 > > > > > deletions(-) > > > > > > > > Whatever was done here I cannot rebase from main to my local > > > > branches. The files remain modified. The only recourse so far was > > > > to delete the local branch and start over. I've done this to one > > > > inconsequential branch so far but hopefully someone can suggest a > > > > solution. > > > > > > Can you show an example of how this fails for you (especially the > > > error messages)? > > > > slippy$ git pull -r --all > > Fetching freebsd > > remote: Enumerating objects: 9, done. > > remote: Counting objects: 100% (9/9), done. > > remote: Compressing objects: 100% (9/9), done. > > remote: Total 9 (delta 3), reused 0 (delta 0), pack-reused 0 > > Unpacking objects: 100% (9/9), 12.42 KiB | 111.00 KiB/s, done. > > From https://git.freebsd.org/src > > 59b3b210a69e..d87ee7b97fe8 stable/13 -> freebsd/stable/13 > > Already up to date. > > slippy$ git co komquats > > Switched to branch 'komquats' > > slippy$ git st > > On branch komquats > > Changes not staged for commit: > > (use "git add ..." to update what will be committed) > > (use "git restore ..." to discard changes in working > > directory) modified: contrib/bc/bc.vcxproj > > modified: contrib/bc/bc.vcxproj.filters > > modified: contrib/bc/bcl.vcxproj > > modified: contrib/bc/bcl.vcxproj.filters > > > > Untracked files: > > (use "git add ..." to include in what will be committed) > > sys/i386/conf/IPFILTER > > usr.sbin/ufdformat/ > > > > no changes added to commit (use "git add" and/or "git commit -a") > > slippy$ git rebase main > > error: cannot rebase: You have unstaged changes. > > error: Please commit or stash them. > > slippy$ git stash push -m foobar > > Saved working directory and index state On komquats: foobar > > slippy$ git rebase main > > error: cannot rebase: You have unstaged changes. > > error: Please commit or stash them. > > slippy$ git st > > On branch komquats > > Changes not staged for commit: > > (use "git add ..." to update what will be committed) > > (use "git restore ..." to discard changes in working > > directory) modified: contrib/bc/bc.vcxproj > > modified: contrib/bc/bc.vcxproj.filters > > modified: contrib/bc/bcl.vcxproj > > modified: contrib/bc/bcl.vcxproj.filters > > > > Untracked files: > > (use "git add ..." to include in what will be committed) > > sys/i386/conf/IPFILTER > > usr.sbin/ufdformat/ > > > > no changes added to commit (use "git add" and/or "git commit -a") > > slippy$ git stash push -m foobar > > Saved working directory and index state On komquats: foobar > > slippy$ git st > > On branch komquats > > Changes not staged for commit: > > (use "git add ..." to update what will be committed) > > (use "git restore ..." to discard changes in working > > directory) modified: contrib/bc/bc.vcxproj > > modified: contrib/bc/bc.vcxproj.filters > > modified: contrib/bc/bcl.vcxproj > > modified: contrib/bc/bcl.vcxproj.filters > > > > Untracked files: > > (use "git add ..." to include in what will be committed) > > sys/i386/conf/IPFILTER > > usr.sbin/ufdformat/ > > > > no changes added to commit (use "git add" and/or "git commit -a") > > slippy$ > > > > rm the files, switch branch to main, rebase again, remove the branch, > > and start over was the only solution. > > > > So far this affected only one branch. My other branches are so far > > unaffected. > > > > As no other branch is affected it appears this was local to this one > > branch. The branch is (was) approximately four months old. Recreating > > it, which wasn't difficult, resolved the issue. > > > > This is the first time I've had any git problems of this nature here > > at FreeBSD. I've (we've) had many at $JOB because of git-lfs, causing > > similar looking issues. But that's a whole different kettle of fish. > > (I'm the only one at $JOB who uses git on a UNIX-like system while > > everyone else uses Visual Studio.) > > > > > > > > > > > > > git restore the files, git rm the files, rm the files, git stash > > > > push, all don't remove them from the branch following rebase. And > > > > subsequent rebase to main will fail. main is ok though. > > > > > > > > What is it that you did to sync the index? > > > > > > Like in the mail thread linked in the git comment, theoretically a > > > noop: > > > > > > git clone https://git@repo.freebsd.org/src.git > > > cd src > > > touch contrib/bc/*vcx* > > > git commit -a > > > git push > > > > > > It's a problem caused by .gitattributes being checked in after the > > > *vcx* files were checked in (again, see the email thread and "man > > > 1 gitattributes"). > > > > > > If it was for me, I would remove the .gitattributes eol specs, they > > > shouldn't be necessary for our purposes. > > > > It's probably growing pains. > > > > It appears only one branch, probably not surprisingly my most used > > branch, was the only one affected. > > > > Hi Cy, > > To add more details and an explanation of what you experienced: > > The bc*vcx* project files were first checked in on April 6th in > 7e5c51e523, containing CRLF line breaks. > > Back then, the attributes were: > > $ git ls-files --eol contrib/bc/bc.vcxproj > i/crlf w/crlf attr/ contrib/bc/bc.vcxproj > > Now, in 8ea9013512 the .gitattributes file was added, containing: > > *.vcxproj eol=crlf > *.vcxproj.filters eol=crlf > *.sln eol= crlf > > This implicitly changed the the files to being "text": > > $ git ls-files --eol contrib/bc/bc.vcxproj > i/crlf w/crlf attr/text eol=crlf contrib/bc/bc.vcxproj > > But the checked-in files still had CRLF in it (which is incompatible > with being text). > > This introduced problems to the repo as described in > https://lists.freebsd.org/pipermail/freebsd-current/2021-April/079569.html > (basically, as soon as the files are touched, they appear as changed). > > You can find a good description of this general problem here: > https://marc.info/?l=git&m=154484903528621&w=2 > > I'm not sure what a real solution to fix history would look like > - technically I guess that the files should have been renormalized > before committing when .gitattributes was added. > > As a workaround, adding this line to .git/info/attributes works: > contrib/bc/bc*.vcx* -text > > This should allow you to merge your various branches without issues. > > Best > Michael > > p.s. @Cy to demonstrate the original problem, try: > > git checkout a4b5f7ba3e > touch contrib/bc/*vcx* > git status -s > > This shows: > > $ git status -s > M contrib/bc/bc.vcxproj > M contrib/bc/bc.vcxproj.filters > M contrib/bc/bcl.vcxproj > M contrib/bc/bcl.vcxproj.filters > > This might look familiar to you: This is the problem you were seeing > while rebasing - because these files were affected by my commit, the > effect is the same as "touch contrib/bc/*vcx*" had above. > > When applying the workaround: > > echo "contrib/bc/bc*.vcx* -text" >>.git/info/attributes > > the problem disappears: > > $ git status > HEAD detached at a4b5f7ba3e9 > nothing to commit, working tree clean > > Note that this is cached, so if you remove the line from > .git/info/attributes, it stays clean until you touch the files again > (can be quite confusing). This recreates the problem (after cloning from a snapshot). slippy$ cd ../29 slippy$ git st Refresh index: 100% (86556/86556), done. On branch komquats Changes not staged for commit: (use "git add ..." to update what will be committed) (use "git restore ..." to discard changes in working directory) modified: contrib/bc/bc.vcxproj modified: contrib/bc/bc.vcxproj.filters modified: contrib/bc/bcl.vcxproj modified: contrib/bc/bcl.vcxproj.filters modified: etc/mtree/BSD.var.dist modified: sys/dev/bge/if_bge.c modified: sys/dev/bge/if_bgereg.h modified: sys/geom/geom.h modified: sys/geom/geom_int.h modified: sys/geom/geom_kern.c modified: sys/geom/geom_subr.c Untracked files: (use "git add ..." to include in what will be committed) sys/i386/conf/IPFILTER usr.sbin/ufdformat/ no changes added to commit (use "git add" and/or "git commit -a") slippy$ git st On branch komquats Changes not staged for commit: (use "git add ..." to update what will be committed) (use "git restore ..." to discard changes in working directory) modified: contrib/bc/bc.vcxproj modified: contrib/bc/bc.vcxproj.filters modified: contrib/bc/bcl.vcxproj modified: contrib/bc/bcl.vcxproj.filters modified: etc/mtree/BSD.var.dist modified: sys/dev/bge/if_bge.c modified: sys/dev/bge/if_bgereg.h modified: sys/geom/geom.h modified: sys/geom/geom_int.h modified: sys/geom/geom_kern.c modified: sys/geom/geom_subr.c Untracked files: (use "git add ..." to include in what will be committed) sys/i386/conf/IPFILTER usr.sbin/ufdformat/ no changes added to commit (use "git add" and/or "git commit -a") slippy$ git restore contrib/bc/bc.vcxproj contrib/bc/bc.vcxproj.filters contrib/bc/bcl.vcxproj contrib/bc/bcl.vcxproj.filters slippy$ git st On branch komquats Changes not staged for commit: (use "git add ..." to update what will be committed) (use "git restore ..." to discard changes in working directory) modified: etc/mtree/BSD.var.dist modified: sys/dev/bge/if_bge.c modified: sys/dev/bge/if_bgereg.h modified: sys/geom/geom.h modified: sys/geom/geom_int.h modified: sys/geom/geom_kern.c modified: sys/geom/geom_subr.c Untracked files: (use "git add ..." to include in what will be committed) sys/i386/conf/IPFILTER usr.sbin/ufdformat/ no changes added to commit (use "git add" and/or "git commit -a") slippy$ git stash list stash@{0}: On komquats: usermod6 stash@{1}: On main: usermods5 stash@{2}: On komquats: usermods4 stash@{3}: On komquats: usermods3 stash@{4}: On komquats: usermods2 stash@{5}: On komquats: usermods slippy$ git stash push -m _buildsys Saved working directory and index state On komquats: _buildsys slippy$ git br * komquats main slippy$ git co main Switched to branch 'main' Your branch is up to date with 'freebsd/main'. slippy$ git pull -r --all Fetching freebsd remote: Enumerating objects: 35, done. remote: Counting objects: 100% (35/35), done. remote: Total 144 (delta 34), reused 34 (delta 34), pack-reused 109 Receiving objects: 100% (144/144), 99.01 KiB | 450.00 KiB/s, done. Resolving deltas: 100% (86/86), completed with 19 local objects. >From https://git.freebsd.org/src a4b5f7ba3e9b..420d30f5bdbf main -> freebsd/main 1a34afa9541e..aa4eb2089751 stable/13 -> freebsd/stable/13 Updating a4b5f7ba3e9b..420d30f5bdbf Fast-forward contrib/bc/bc.vcxproj | 554 ++++++++++++++++++++------------------ --- contrib/bc/bc.vcxproj.filters | 362 +++++++++++++-------------- contrib/bc/bcl.vcxproj | 320 ++++++++++++------------ contrib/bc/bcl.vcxproj.filters | 190 +++++++------- release/arm/armv7.conf | 8 + share/man/man9/kasan.9 | 22 +- share/mk/src.libnames.mk | 3 - sys/amd64/amd64/pmap.c | 2 +- sys/dev/ipmi/ipmi_isa.c | 4 + sys/dev/ipmi/ipmi_pci.c | 4 + sys/dev/ipmi/ipmi_smbios.c | 19 +- sys/dev/ipmi/ipmi_smbus.c | 4 + sys/kern/subr_asan.c | 10 +- sys/netpfil/pf/pf_nv.c | 8 +- sys/sys/asan.h | 2 +- 15 files changed, 776 insertions(+), 736 deletions(-) create mode 100644 release/arm/armv7.conf slippy$ git br komquats * main slippy$ git co komquats Switched to branch 'komquats' slippy$ git rebase main error: cannot rebase: You have unstaged changes. error: Please commit or stash them. slippy$ git st On branch komquats Changes not staged for commit: (use "git add ..." to update what will be committed) (use "git restore ..." to discard changes in working directory) modified: contrib/bc/bc.vcxproj modified: contrib/bc/bc.vcxproj.filters modified: contrib/bc/bcl.vcxproj modified: contrib/bc/bcl.vcxproj.filters Untracked files: (use "git add ..." to include in what will be committed) sys/i386/conf/IPFILTER usr.sbin/ufdformat/ no changes added to commit (use "git add" and/or "git commit -a") slippy$ Going back in time through each daily snapshot, my April 26 0230U snapshot first exhibited the problem. My remediation efforts are below: slippy$ git st On branch komquats Changes not staged for commit: (use "git add ..." to update what will be committed) (use "git restore ..." to discard changes in working directory) modified: contrib/bc/bc.vcxproj modified: contrib/bc/bc.vcxproj.filters modified: contrib/bc/bcl.vcxproj modified: contrib/bc/bcl.vcxproj.filters Untracked files: (use "git add ..." to include in what will be committed) sys/i386/conf/IPFILTER usr.sbin/ufdformat/ no changes added to commit (use "git add" and/or "git commit -a") slippy$ git br * komquats main slippy$ git restore contrib/bc/bc.vcxproj contrib/bc/bc.vcxproj.filters contrib/bc/bcl.vcxproj contrib/bc/bcl.vcxproj.filters slippy$ git st On branch komquats Changes not staged for commit: (use "git add ..." to update what will be committed) (use "git restore ..." to discard changes in working directory) modified: contrib/bc/bc.vcxproj modified: contrib/bc/bc.vcxproj.filters modified: contrib/bc/bcl.vcxproj modified: contrib/bc/bcl.vcxproj.filters Untracked files: (use "git add ..." to include in what will be committed) sys/i386/conf/IPFILTER usr.sbin/ufdformat/ no changes added to commit (use "git add" and/or "git commit -a") slippy$ git stash push -m borked Saved working directory and index state On komquats: borked slippy$ git st On branch komquats Changes not staged for commit: (use "git add ..." to update what will be committed) (use "git restore ..." to discard changes in working directory) modified: contrib/bc/bc.vcxproj modified: contrib/bc/bc.vcxproj.filters modified: contrib/bc/bcl.vcxproj modified: contrib/bc/bcl.vcxproj.filters Untracked files: (use "git add ..." to include in what will be committed) sys/i386/conf/IPFILTER usr.sbin/ufdformat/ no changes added to commit (use "git add" and/or "git commit -a") slippy$ rm contrib/bc/bc.vcxproj contrib/bc/bc.vcxproj.filters contrib/bc/bcl.vcxproj contrib/bc/bcl.vcxproj.filters slippy$ git st On branch komquats Changes not staged for commit: (use "git add/rm ..." to update what will be committed) (use "git restore ..." to discard changes in working directory) deleted: contrib/bc/bc.vcxproj deleted: contrib/bc/bc.vcxproj.filters deleted: contrib/bc/bcl.vcxproj deleted: contrib/bc/bcl.vcxproj.filters Untracked files: (use "git add ..." to include in what will be committed) sys/i386/conf/IPFILTER usr.sbin/ufdformat/ no changes added to commit (use "git add" and/or "git commit -a") slippy$ git rebase main error: cannot rebase: You have unstaged changes. error: Please commit or stash them. slippy$ There is no way to move forward except to rm (not git rm but UNIX rm) the files. Checkout another branch and blow away the affected branch. With the files physically deleted with rm(1) I could switch branches and blow away the affected branch. Without this extreme I can't even switch branches. Lucky for me this branch was a placeholder maintaining a record of what was installed on my laptop vs main, so it's easy to blow away and recreate. But for people with committed changes to a branch this would be a huge problem. My other branches which I rebase much less frequently were unaffected. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few.