Page 3 of 5

Re: PR 2730, "Fix" line-endings

Posted: Wed Dec 04, 2019 5:55 pm
by ezzieyguywuf
Latest PR closed. PR 2751.

Leaving that link here as a reference, as the script used may be helpful to people in the future.
wmayer wrote: Wed Dec 04, 2019 9:36 am git blame has the option -w
This is absolutely the best way to approach this problem: nicely done wmayer!

Re: PR 2730, "Fix" line-endings

Posted: Wed Dec 04, 2019 11:46 pm
by sgrogan
ezzieyguywuf wrote: Wed Dec 04, 2019 5:55 pm This is absolutely the best way to approach this problem: nicely done wmayer!
Does anyone know what the github webgui uses? Or if can be configured to use the -w switch?

Re: PR 2730, "Fix" line-endings

Posted: Thu Dec 05, 2019 3:12 am
by wmayer
sgrogan wrote: Wed Dec 04, 2019 11:46 pm
ezzieyguywuf wrote: Wed Dec 04, 2019 5:55 pm This is absolutely the best way to approach this problem: nicely done wmayer!
Does anyone know what the github webgui uses? Or if can be configured to use the -w switch?
I wonder about this too as that's the way I most often use to check changes.

Re: PR 2730, "Fix" line-endings

Posted: Thu Dec 05, 2019 11:16 am
by ezzieyguywuf
5C3A6409-C5FD-44B1-ACEB-A6E2EEBF7D48.png
5C3A6409-C5FD-44B1-ACEB-A6E2EEBF7D48.png (245.29 KiB) Viewed 2463 times
Looks like it does not use the “-w”, though I’m not sure if it’s configurable.

here is a link

Re: PR 2730, "Fix" line-endings

Posted: Thu Dec 05, 2019 12:04 pm
by wmayer
I found the answer here: https://stackoverflow.com/questions/444 ... -on-github

To test:
A while ago I had one of these commits that changed the line-endings of a file git commit 71dae0e63
When you look at the changes then the file src/Mod/Import/Gui/AppImportGuiPy.cpp has many whitespace changes. If you follow the solution and add ?w=1 at the end of the url you will see that only a few lines have actually changed in that file.

Re: PR 2730, "Fix" line-endings

Posted: Thu Dec 05, 2019 3:09 pm
by ezzieyguywuf
wmayer wrote: Thu Dec 05, 2019 12:04 pm add ?w=1 at the end of the url
😍

@wmayer you’re on fire!

Edit:

Didn’t work for me for the blame link I posted above, on my phone...

Re: PR 2730, "Fix" line-endings

Posted: Thu Dec 05, 2019 3:58 pm
by wmayer
ezzieyguywuf wrote: Thu Dec 05, 2019 3:09 pm Edit:

Didn’t work for me for the blame link I posted above, on my phone...
Yes, this is true but when I go to your FEM branch and look at the changes of the first commit then all files are modified. When adding the suffix it shows for every file whitespace-only change

https://github.com/FreeCAD/FreeCAD/pull ... 80e708?w=1

Re: PR 2730, "Fix" line-endings

Posted: Fri Dec 06, 2019 7:03 am
by bernd
get rid of line ending diffs in github by adding

wmayer wrote: Thu Dec 05, 2019 3:58 pm ?w=1
at the end of the address is a very value finding :D


https://github.com/FreeCAD/FreeCAD/commit/14eb6869a9
vs.
https://github.com/FreeCAD/FreeCAD/comm ... 6869a9?w=1

Re: PR 2730, "Fix" line-endings

Posted: Fri Dec 06, 2019 7:47 am
by Kunda1
bernd wrote: Fri Dec 06, 2019 7:03 am get rid of line ending diffs in github by adding
wmayer wrote: ?w=1
https://github.com/FreeCAD/FreeCAD/commit/14eb6869a9
vs.
https://github.com/FreeCAD/FreeCAD/comm ... 6869a9?w=1
This is a valuable gem. Nice!

Re: PR 2730, "Fix" line-endings

Posted: Fri Dec 06, 2019 7:58 am
by bernd
https://github.com/FreeCAD/FreeCAD/pull/2757

some informations. I had trouble on interactive rebases if adding the gitattribute file and the normalizing is in sparate commits. Thus I put it into one commit. The PR as it is now is how I would like to merge it into master.

IMHO, After the merge we should wait some time how does it work out until we do think about further changes in this regard.

bernd