Not yet systematically. After setting it to false and doing nothing
else, git status still shows
src/sage/misc/element_with_label.py as modified, even after 'git
checkout --'. Trying to get back to sanity a different way, 'git
stash' now outputs
warning: CRLF will be replaced by LF in src/sage/misc/element_with_label.py.
The file will have its original line endings in your working directory.
warning: CRLF will be replaced by LF in src/sage/misc/element_with_label.py.
The file will have its original line endings in your working directory.
Saved working directory and index state WIP on develop: 8453ffb
Updated SageMath version to 9.3.beta7
HEAD is now at 8453ffb Updated SageMath version to 9.3.beta7
but git status still shows that file as modified. Now I cannot just
checkout a different existing branch (since there are apparently
modified files), but I can checkout a new branch (g = alias for git)
$ g co -b dud
M src/sage/misc/element_with_label.py
Switched to a new branch 'dud'
the delete the 'develop' branch (which was the same as upstream anyway):
$ g branch -d develop
Deleted branch develop (was 8453ffb).
and now recreate the develop branch
$ g remote update trac
(...)
$ g co -b develop trac/develop
M src/sage/misc/element_with_label.py
Branch develop set up to track remote branch develop from trac.
Switched to a new branch 'develop'
and we are back to where we started. All of the above was with
core.autolf set to false.
On the same machine, in a completely new clone made and built
yesterday, git status shows
$ g st
On branch develop
Your branch is up-to-date with 'origin/develop'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: src/sage/rings/invariants/__init__.py
no changes added to commit (use "git add" and/or "git commit -a")
So the same problem with a new file -- which only has 2 bytes in it!
AFter dos2unix-ing it (so it now has 1 byte) it is still showing up in
git status. AFter git checkout -- it goes back to having 2 bytes and
still shows up.
It seems to be impossible to do any sage development here. I am now
trying yet another git clone -- so the global config of core.autolf is
in force as the clone is made -- but then after the clone from
git://
github.com/sagemath/sage.git that same file is shown as
modified. For some reason I have been making the cones from github
and then adding trac as a remote. As a variant I made a fresh clone
from trac -- but see exactly the same.
A similar problem was reported on stackexchange *over 9 years ago* by
a Mac users whose collaborators were all ubuntu users. There, it is
suggest to look at the .gitattributes file, and *in this fresh clone*
that file contains
# Force LF normalization
* text=auto eol=lf
# except for Windows batch files
*.{cmd,[cC][mM][dD]} text eol=crlf
*.{bat,[bB][aA][tT]} text eol=crlf
*.diff_bin binary
This is commit 5328570 which is 9.2, master branch, but the develop
branch has the same.
To me it seems (from reading all that stackexchange page) that this is
not just a problem caused by something in my local configuration, but
something which has happened to the repository itself, which needs to
be fixed. But I am no expert.
Just to add to the fun, on a second machine with the same ubuntu
version as the one above (16.04.7 LTS) and same git version 2.7.4, a
clone I made yesterday shows no problems at all, while and older clone
on which I had done development for a long time has some CRLF file
issues. The only differences in the global .gitconfig between the two
machines is the core.autolf which I just added to the first.
I do have some clones without these problems so can keep on working,
but I also have branches I wanted to do more work on in clones which
are unusable.
John
>
> >
> > So, I did not change anything (as far as I can tell -- except get
> > older) but my git state changed. These files stay changed even after
> > trying to reset them (though *I* did not change them) using git
> > checkout --.
>
> It's a new version of git that got you, I suppose.
Yes, that is likely, since I did do package updates across the board
before this started to happen. I am seeing it on machines running:
ubuntu 16.04.7 LTS and git 2.7.4
ubuntu 18.04.5 LTS and git 2.17.1
ubuntu 20.04.2 LTS and git 2.25.1
In no cases was the whole OS updated, just packages so possibly git,
but I don't know what git version any had before this.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/sage-devel/CAAWYfq19RqXJ1oNgiTo3hX0yV06dXtMEenu-yuXjoM5S9XLhfg%40mail.gmail.com.