Opened 13 months ago

Closed 11 months ago

Last modified 7 months ago

#29733 closed enhancement (fixed)

Create gitattributes file specifying proper line endings

Reported by: gh-tobiasdiez Owned by:
Priority: minor Milestone: sage-9.2
Component: build Keywords:
Cc: Merged in:
Authors: Tobias Diez Reviewers: Matthias Koeppe
Report Upstream: N/A Work issues:
Branch: 1f027c9 (Commits, GitHub, GitLab) Commit:
Dependencies: Stopgaps:

Status badges

Description

If you checkout sage on Windows, the line endings are wrong (depending on the core.autocrlf setting).

This PR adds a .gitattributes file which specifies the correct line ending so that simply cloning sage results in the correct line ending for all files. See the following documentation for more information https://code.visualstudio.com/docs/remote/troubleshooting#_resolving-git-line-ending-issues-in-containers-resulting-in-many-modified-files

Change History (17)

comment:1 Changed 13 months ago by gh-tobiasdiez

  • Status changed from new to needs_review

comment:2 Changed 13 months ago by mkoeppe

Could you also take a look at the documentation that we have related to this in README.md? Does it need updating?

comment:3 Changed 13 months ago by git

  • Commit changed from 4778e85121dbb4af2854a5b40e59c6d9bb4e9a84 to aba4268fff3cad467dcb709495e12895b3cabfb4

Branch pushed to git repo; I updated commit sha1. New commits:

aba4268Streamline readme based on changes

comment:4 follow-up: Changed 13 months ago by gh-tobiasdiez

Good point. I've changed the readme accordingly.

(Btw, the documentation at https://doc.sagemath.org/html/en/developer/walk_through.html is not really reflecting some of the recent changes to the readme.)

comment:5 Changed 13 months ago by mkoeppe

Thanks, I've opened #29784 for that.

comment:6 in reply to: ↑ 4 Changed 13 months ago by mkoeppe

Replying to gh-tobiasdiez:

Good point. I've changed the readme accordingly.

I think it's better to keep the --branch master in the documentation -- so that it becomes clear for beginners how to select a different branch...

comment:7 follow-up: Changed 12 months ago by gh-tobiasdiez

I probably miss something, but what's the purpose of the --branch master part? The clone command still fetches all branches so that changing a branch is a matter of git checkout <branch>. So why would you want to use the clone with a different branch?

But if you think it would be helpful, I'll readd this of course.

comment:8 in reply to: ↑ 7 Changed 12 months ago by mkoeppe

Replying to gh-tobiasdiez:

I probably miss something, but what's the purpose of the --branch master part?

Of course it's redundant but by including it, it is more obvious to beginning users what to change to get the "develop" branch. At this point they do not necessarily know about git, and I don't think the README is a place to educate them about it. Think of a user who used to unpack tarballs but is taking a tiny step into the scary git world.

comment:9 Changed 12 months ago by mkoeppe

In any case, removing it does not belong on this ticket.

comment:10 Changed 12 months ago by git

  • Commit changed from aba4268fff3cad467dcb709495e12895b3cabfb4 to 1f027c921ab769d059aada4986754c5617bf6455

Branch pushed to git repo; I updated commit sha1. New commits:

1f027c9Readd branch statement to clone

comment:11 Changed 12 months ago by gh-tobiasdiez

Ok, I've readded it.

comment:12 Changed 12 months ago by mkoeppe

  • Reviewers set to Matthias Koeppe
  • Status changed from needs_review to positive_review

comment:13 Changed 12 months ago by gh-tobiasdiez

Is there anything else to do from my side?

comment:14 Changed 12 months ago by chapoton

no, just be patient

comment:15 Changed 11 months ago by vbraun

  • Branch changed from u/gh-tobiasdiez/gitattributes to 1f027c921ab769d059aada4986754c5617bf6455
  • Resolution set to fixed
  • Status changed from positive_review to closed

comment:16 Changed 10 months ago by saraedum

  • Commit 1f027c921ab769d059aada4986754c5617bf6455 deleted

Could it be that this broke #30403?

comment:17 Changed 7 months ago by chapoton

and this is also breaking some of the gitlab workers, maybe ?

Note: See TracTickets for help on using tickets.