AMDG I just noticed that all the files for hana had \n line endings in my working copy. To fix this I had to copy .gitattributes from the superproject. (Or am I just using git wrong) In Christ, Steven Watanabe
Steven Watanabe
AMDG
I just noticed that all the files for hana had \n line endings in my working copy. To fix this I had to copy .gitattributes from the superproject. (Or am I just using git wrong)
In Christ, Steven Watanabe
Thanks, I just added a .gitattributes file. I think it should do the trick, but let me know if it does not. The file is on the develop branch. Regards, Louis
AMDG On 02/24/2016 06:59 PM, Louis Dionne wrote:
Steven Watanabe
writes: I just noticed that all the files for hana had \n line endings in my working copy. To fix this I had to copy .gitattributes from the superproject. (Or am I just using git wrong)
Thanks, I just added a .gitattributes file. I think it should do the trick, but let me know if it does not. The file is on the develop branch.
It looks okay now. In Christ, Steven Watanabe
On 25 Feb 2016 at 1:59, Louis Dionne wrote:
Thanks, I just added a .gitattributes file. I think it should do the trick, but let me know if it does not. The file is on the develop branch.
After a late application of a .gitattributes it would be wise to apply a round of https://stackoverflow.com/questions/1510798/trying-to-fix-line-endings -with-git-filter-branch-but-having-no-luck/1511273#1511273. If everything is fine it does no harm, if anything is off it saves a ton of weirdness for your end users down the line. Whilst doing a crlf conversion I'd also recommend a round of clang-format, gets all the changes done at once. Add clang format to your CI after that to keep your source code looking nice. Niall -- ned Productions Limited Consulting http://www.nedproductions.biz/ http://ie.linkedin.com/in/nialldouglas/
Niall Douglas
On 25 Feb 2016 at 1:59, Louis Dionne wrote:
Thanks, I just added a .gitattributes file. I think it should do the trick, but let me know if it does not. The file is on the develop branch.
After a late application of a .gitattributes it would be wise to apply a round of https://stackoverflow.com/questions/1510798/trying-to-fix-line-endings -with-git-filter-branch-but-having-no-luck/1511273#1511273. If everything is fine it does no harm, if anything is off it saves a ton of weirdness for your end users down the line.
I did it, but there's nothing to change. It seems like the line endings are already OK. But thanks for the heads up.
Whilst doing a crlf conversion I'd also recommend a round of clang-format, gets all the changes done at once. Add clang format to your CI after that to keep your source code looking nice.
I tried setting up clang-format, but I could never get it to do exactly what I wanted. It always changes stuff that I don't want it to, so I eventually gave up. Louis
On 25 Feb 2016 at 22:32, Louis Dionne wrote:
Whilst doing a crlf conversion I'd also recommend a round of clang-format, gets all the changes done at once. Add clang format to your CI after that to keep your source code looking nice.
I tried setting up clang-format, but I could never get it to do exactly what I wanted. It always changes stuff that I don't want it to, so I eventually gave up.
You're not wrong that most of clang-format's value is for enforcing a consistent style when multiple people are modifying the code over time. That's not so much the case for Hana right now, but in a few years you'll be seeing a lot of pull requests from others etc and some people really mangle what they send you for review making it much harder to grok. clang format is therefore gold for when a library matures. That said, I installed the experimental "always on" clang format plugin for VS2015 recently which applies clang format every save for you live in the IDE. As I hit save a lot during coding, this lets me fix up any unhelpful reformats as I go. It's not bad if you're building a codebase from scratch as I am with AFIO v2, I think I'll be keeping it permanently as it's fire and forget, and makes things like tab issues go away forever. Essentially I think clang format useful for mature code and brand new code. It's not particularly useful for anything in between, if anything it costs me more typing than it saves me :) Niall -- ned Productions Limited Consulting http://www.nedproductions.biz/ http://ie.linkedin.com/in/nialldouglas/
participants (3)
-
Louis Dionne
-
Niall Douglas
-
Steven Watanabe