issue #1352 from 2014
Do we want to document the @shoogen workaround ?
DOS line endings makes applying patches on Linux really hard
DOS line endings makes applying patches on Linux really hard
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: DOS line endings makes applying patches on Linux really hard
Related forum topic: viewtopic.php?t=15443
"fight the good fight"
- kkremitzki
- Veteran
- Posts: 2447
- Joined: Thu Mar 03, 2016 9:52 pm
- Location: Illinois
Re: DOS line endings makes applying patches on Linux really hard
What is the workaround exactly? Removing Windows line endings on files as they're touched/as needed by package maintainers?
IMO getting rid of Windows line endings piecemeal is not a great solution. You still end up with the same issue of a big commit making the revision history less useful. The alternative is a history-rewriting change that will mess up people's cloned repos, forks, etc. This will have some pain, but so does ripping off a bandaid. There are tools specifically for this, see git-filter-branch: https://git-scm.com/docs/git-filter-branch
The number of people who are actively working off & contributing from cloned repos is probably pretty manageable, and as long as a clear path for getting through it (arrived by testing, which I can help with) is included with the announcement that it's going to happen, it should be fine.
I'm not sure what runtime path issues jobermayr is referring to, but other concerns like conforming to the filesystem hierarchy and mixed line endings are valid and I think if they are reasonably fixable they should be. (BTW there's 1.34 million hits for "mixed line endings issues" on Google for me.)
Wouldn't this flag from man git-blame address that?IMHO adding a single commit to our repo that will remove all Carriage Returns has some drawbacks.
The most important is that it will render the "git blame" command useless and that will make the repo bigger.
Code: Select all
-w
Ignore whitespace when comparing the parent’s version and the child’s to find where the lines came from.
The number of people who are actively working off & contributing from cloned repos is probably pretty manageable, and as long as a clear path for getting through it (arrived by testing, which I can help with) is included with the announcement that it's going to happen, it should be fine.
I'm not sure what runtime path issues jobermayr is referring to, but other concerns like conforming to the filesystem hierarchy and mixed line endings are valid and I think if they are reasonably fixable they should be. (BTW there's 1.34 million hits for "mixed line endings issues" on Google for me.)
Re: DOS line endings makes applying patches on Linux really hard
Revisiting this issue (now issue #5578) in lieu of issue #6497. Since 6497 is pretty invasive and 5578 is super invasive...would now be a good time to execute them both?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
-
- Posts: 22
- Joined: Sun Nov 29, 2020 5:30 am
Re: DOS line endings makes applying patches on Linux really hard
Use git blame --ignore-rev/--ignore-revs-file to keep git blame sane? Common naming for the revs file is .git-blame-ignore-revs.
See e.g. https://www.moxio.com/blog/43/ignoring- ... -git-blame
See e.g. https://www.moxio.com/blog/43/ignoring- ... -git-blame
Re: DOS line endings makes applying patches on Linux really hard
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
- adrianinsaval
- Veteran
- Posts: 5414
- Joined: Thu Apr 05, 2018 5:15 pm
Re: DOS line endings makes applying patches on Linux really hard
Another possibility is to rewrite history as was mentioned and force push, perhaps at the same time as yorik's proposed nuking of the big help files. Probably best to do that kind of stuff after toponaming merge because that's as huuge portion of code that would have to be probably painfully rebased.Kunda1 wrote: ↑Mon Mar 21, 2022 10:08 pm Revisiting this issue (now issue #5578) in lieu of issue #6497. Since 6497 is pretty invasive and 5578 is super invasive...would now be a good time to execute them both?
Re: DOS line endings makes applying patches on Linux really hard
Good news -- GitHub now has support for the ignore file in public beta: https://docs.github.com/en/repositories ... blame-view