git: a0358e3d5184 - main - Synch index of contrib/bc with what is in workdir after cloning.
Michael Gmelin
grembo at freebsd.org
Thu Apr 29 21:28:34 UTC 2021
On Thu, 29 Apr 2021 13:20:06 -0700
Cy Schubert <Cy.Schubert at cschubert.com> wrote:
> In message <20210429200740.5e8bfe5a at bsd64.grem.de>, Michael Gmelin
> writes:
> ...
> > also easily demonstrate the problem by doing:
> >
> > cp -a /usr/src /usr/srccopy
> > cd /usr/src/srccopy
> > git status
>
> No luck with this.
>
> >
> > Or by doing:
> >
> > cd /usr/src
> > rm .git/index
> > git reset
> > git status
>
> No luck with this either:
>
> > ...
> >
> > or by doing:
> >
> > cd /usr/src
> > touch contrib/bc/*vcx*
> > git status
>
> Same slippy$ touch contrib/bc/*vcx*
> You have new mail.
You might have misread my email. The point of these various tests
was to demonstrate how the problem came into the tree and why I
committed the changed files today. Hence "demonstrate the problem", not
"demonstrate the solution to the problem".
> Next I tried committing the following to the branch:
>
> slippy$ git br
> * komquats
> main
> slippy$ git ci contrib/bc/bc.vcxproj contrib/bc/bc.vcxproj.filters
> contrib/bc/bcl.vcxproj contrib/bc/bcl.vcxproj.filters
> ...
> Switched to branch 'main'
> Your branch is up to date with 'freebsd/main'.
> ...
> slippy$ git co komquats
> error: Your local changes to the following files would be overwritten
> by checkout:
> contrib/bc/bc.vcxproj
> contrib/bc/bc.vcxproj.filters
> contrib/bc/bcl.vcxproj
> contrib/bc/bcl.vcxproj.filters
> Please commit your changes or stash them before you switch branches.
> Aborting
If this was on "main" from today (a0358e3d51849 or later), this
shouldn't happen (just tested it myself). If it was main from your ZFS
snapshot from a few days ago, then I would expect to see this result.
> ...
> >
> > 1. Simply add the files that are shown as changed on your local
> > branch (that's all my commit did, "git commit -a").
> > 2. Temporarily do:
> > echo "contrib/bc/bc*.vcx* -text" >>.git/info/attributes
>
> Neither of those worked for me. Again this is purely academic now but
> looking to understand this should it happen again, with committed
> work.
I tested 2. again locally and it works for me.
>
> I've saved the entire zfs filesystem tree in a zfs-send stream for
> more experimentation later. Hopefully my notes above are of some
> value to someone.
>
Any chance you could share that ZFS stream with me? I would like to
reproduce your results.
Best
Michael
--
Michael Gmelin
More information about the dev-commits-src-all
mailing list