OpenCDSS / cdss-app-statecu-fortran

Colorado's Decision Support Systems (CDSS) StateCU consumptive use model code, documentation, tests
GNU General Public License v3.0
1 stars 1 forks source link

Need to commit source code once to convert from CRNL to NL end of lines #7

Closed smalers closed 5 years ago

smalers commented 5 years ago

The OpenCDSS StateCU repository was initialized from the repository from Jim Brannon. The code from this repository was then compared with the latest files from Wilson Water Group, and only a few files were different, mainly the readrcr.for file, which had some differences and Linux-style line endings (NL), and the getcommandline_gfortran.for and getcommandline_intel.for were newer. The OpenCDSS repository was updated to include a .gitattributes file with * text=auto line, which tells Git to store text files with NL in the repository and check out to the operating system convention, CRNL on Windows, in order to better support development on different operating systems. Although a commit of source code did occur because files were moved into different folders, this did not apparently cause a commit that saved the NL line endings. Consequently, now, when the repository is checked out a "git status" immediately shows most source files as being different (excluding the ones mentioned above and makefile, which was changed). "git diff file | cat -v" shows that the only difference is line endings. A download of individual files from the GitHub website confirms that most code has CRNL at the end, except for files mentioned above. Therefore, it looks like a new commit needs to occur to get the NL into the repository so that the cross-platform normalized code can be used going forward. This will cause a reset in history but given that the code is pretty stable with not much development in the last few years, this is probably OK.

smalers commented 5 years ago

The code was committed. GitHub provides a feature to show previous "blame" when such a case is detected so hopefully people can track history when needed. Close the issue.