Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Apr 2021 21:45:03 +0200
From:      Michael Gmelin <freebsd@grem.de>
To:        Stefan Esser <se@freebsd.org>
Cc:        Yuri Pankov <yuripv@ftml.net>, current@freebsd.org
Subject:   Re: git magic in contrib/bc
Message-ID:  <EC588346-BB67-44FF-B368-06E70CA44F22@grem.de>
In-Reply-To: <2b6e40a1-9aff-d587-ddb4-60157c46f404@freebsd.org>
References:  <2b6e40a1-9aff-d587-ddb4-60157c46f404@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help


> On 28. Apr 2021, at 21:37, Stefan Esser <se@freebsd.org> wrote:
>=20
> =EF=BB=BFAm 28.04.21 um 20:44 schrieb Michael Gmelin:
>>=20
>>=20
>>> On Wed, 28 Apr 2021 20:00:38 +0300
>>> Yuri Pankov <yuripv@ftml.net> wrote:
>>>=20
>>> Not sure if it's just me, but I'm seeing a bit of git weirdness in
>>> contrib/bc:
>>=20
>> I'm seeing the same here, also when doing:
>>=20
>>  rm .git/index
>>  git reset
>>  git status
>>=20
>> after this, `git diff' also shows what changed in those files (basically
>> every line). It's all whitespace characters, as `git diff -w' is empty.
>>=20
>> Turns out EOLs changed, I suspect this is due to the eol overrides in
>> contrib/bc/.gitattributes. If I comment those out, "git diff" is silent
>> again.
>=20
> Yes, the new file .gitattributes has recently been committed by me
> as part of an upgrade.
>=20
> I do assume that the files affected are only for the Windows build
> that has been added in version 4.0.0.
>=20
> I do not know how to fix this problem (and whether this is just a
> nuisance or an actual problem).
>=20

https://git-scm.com/docs/gitattributes says:
=E2=80=9C eol
This attribute sets a specific line-ending style to be used in the working d=
irectory. It enables end-of-line conversion without any content checks, effe=
ctively setting the text attribute. Note that setting this attribute on path=
s which are in the index with CRLF line endings may make the paths to be con=
sidered dirty. Adding the path to the index again will normalize the line en=
dings in the index.=E2=80=9D

Without completely understanding the problem, I would suggest to try the fol=
lowing:

   rm .git/index
   git reset
   git commit -a
   git push

(this should re-add the files to the index using the correct attributes)

Best,
Michael

> The upstream repository is https://git.yzena.com/gavin/bc and I have
> performed a "diff -r" of the distfile of the math/gh-bc port against
> the files in vendor/bc in our repository (before the commit to that
> repository) and thus any change that we locally apply will need to
> be upstreamed.
>=20
> Regards, STefan
>=20



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?EC588346-BB67-44FF-B368-06E70CA44F22>