Re: Autoformat source code issue
Merge yours, I'll try another ackk (remove / add back) tomorrow. Le mar. 21 avr. 2020 à 19:44, Lyor Goldstein a écrit : > >> >> Could you try with https://github.com/gnodet/mina-sshd/tree/SSHD-978 > and see if it's stable for you > > Works for me - except BCrypt.java seems to still require CRLF changes > somehow > I guess it will keep doing that every time we "ping pong" commits for it. > I therefore think since it is the only such file and not subject to > changes we can live with it being "changed" > when we commit some new changes. > > In view of this - do you want me to merge my SSHD-978 branch or yours into > master ? > -- Guillaume Nodet
Re: Autoformat source code issue
>> >> Could you try with https://github.com/gnodet/mina-sshd/tree/SSHD-978 and see if it's stable for you Works for me - except BCrypt.java seems to still require CRLF changes somehow I guess it will keep doing that every time we "ping pong" commits for it. I therefore think since it is the only such file and not subject to changes we can live with it being "changed" when we commit some new changes. In view of this - do you want me to merge my SSHD-978 branch or yours into master ?
Re: Autoformat source code issue
>> I can still see mixed lf / crlf in the BCrypt.java file, so I'll push another commit to get rid of those. I saw the same and tried to get rid of them - no success either >> Could you try with https://github.com/gnodet/mina-sshd/tree/SSHD-978 and see if it's stable for you Will do - but if BCrypt.java is somehow "special" and will be "updated" every time I guess I can live with it
Re: Autoformat source code issue
>> When working on an existing repo and modifying the .gitattributes, you may need to use the --renormalize option as indicated in https://help.github.com/en/github/using-git/configuring-git-to-handle-line-endings#refreshing-a-repository-after-changing-line-endings to fix the line endings. >> After running git add --renormalize . , I only have the BCrypt.java file >> which definitely has incorrect line endings. >> Could you try a clean repo and/or using the --renormalize option ? I was able to achieve what is required using the '--renormalize; option - see https://github.com/apache/mina-sshd/pull/125 For future reference - my .gitconfig settings are: [core] eol = lf autocrlf = false filemode = false Can you give the branch https://github.com/lgoldstein/mina-sshd/tree/SSHD-978 a try on your host and let me know if there are any issues on your end ? You may need to do as recommended in the link you sent me... Please note that my host is Windows - if you can try this on a Linux it would help (I have a VirtualBox Ubuntu that I will try but it may take time...) Thx.
Re: Autoformat source code issue
The plugin is definitely supposed to handle all line endings kind. I've boot up a windows 10 VM, cloned the git repo, built the whole sshd project. modified: sshd-common/src/main/java/org/apache/sshd/common/cipher/package.html modified: sshd-common/src/main/java/org/apache/sshd/common/compression/package.html modified: sshd-common/src/main/java/org/apache/sshd/common/config/keys/loader/openssh/kdf/BCrypt.java modified: sshd-common/src/main/java/org/apache/sshd/common/digest/package.html modified: sshd-common/src/main/java/org/apache/sshd/common/mac/package.html modified: sshd-common/src/main/java/org/apache/sshd/common/random/package.html modified: sshd-common/src/main/java/org/apache/sshd/common/signature/package.html So that does not look so terrible at this point. I suppose if you check out a clean repo, you should have the same, and those should be fixed anyway. When working on an existing repo and modifying the .gitattributes, you may need to use the --renormalize option as indicated in https://help.github.com/en/github/using-git/configuring-git-to-handle-line-endings#refreshing-a-repository-after-changing-line-endings to fix the line endings. After running git add --renormalize . , I only have the BCrypt.java file which definitely has incorrect line endings. Could you try a clean repo and/or using the --renormalize option ? Le lun. 20 avr. 2020 à 20:46, Jonathan Valliere a écrit : > Did you delete the whole repo and re-clone it? I have no idea, I don’t use > Windows for anything relating to work. > > On Mon, Apr 20, 2020 at 1:49 PM Lyor Goldstein > wrote: > > > >> >> > > https://stackoverflow.com/questions/21822650/disable-git-eol-conversions > > >> >> You will probably have to checkout the repo again. > > > > >> Thx - I'll give it a try... > > > > No good - tried all sort of combinations for .gitconfig and > .gitattributes > > but none worked quite frustrating - makes no sense to commit 100's of > > "changed" files - not to mention not being able to distinguish between > real > > changes and CRLF ones Feels like this auto-formatting is proving more > > trouble than benefit... > > > -- Guillaume Nodet
Re: Autoformat source code issue
Did you delete the whole repo and re-clone it? I have no idea, I don’t use Windows for anything relating to work. On Mon, Apr 20, 2020 at 1:49 PM Lyor Goldstein wrote: > >> >> > https://stackoverflow.com/questions/21822650/disable-git-eol-conversions > >> >> You will probably have to checkout the repo again. > > >> Thx - I'll give it a try... > > No good - tried all sort of combinations for .gitconfig and .gitattributes > but none worked quite frustrating - makes no sense to commit 100's of > "changed" files - not to mention not being able to distinguish between real > changes and CRLF ones Feels like this auto-formatting is proving more > trouble than benefit... >
Re: Autoformat source code issue
>> >> https://stackoverflow.com/questions/21822650/disable-git-eol-conversions >> >> You will probably have to checkout the repo again. >> Thx - I'll give it a try... No good - tried all sort of combinations for .gitconfig and .gitattributes but none worked quite frustrating - makes no sense to commit 100's of "changed" files - not to mention not being able to distinguish between real changes and CRLF ones Feels like this auto-formatting is proving more trouble than benefit...
Re: Autoformat source code issue
>> https://stackoverflow.com/questions/21822650/disable-git-eol-conversions >> You will probably have to checkout the repo again. Thx - I'll give it a try...
Re: Autoformat source code issue
https://stackoverflow.com/questions/21822650/disable-git-eol-conversions You will probably have to checkout the repo again. On Mon, Apr 20, 2020 at 1:23 PM Lyor Goldstein wrote: > >> Maven auto format might be converting it back to LF then GIT gets > confused? Maybe just disable the conversion to CRLF? > > How do I do that ? >
Re: Autoformat source code issue
>> Maven auto format might be converting it back to LF then GIT gets confused? Maybe just disable the conversion to CRLF? How do I do that ?
Re: Autoformat source code issue
Maven auto format might be converting it back to LF then GIT gets confused? Maybe just disable the conversion to CRLF? On Mon, Apr 20, 2020 at 11:03 AM Lyor Goldstein wrote: > >> I thought GIT does this automatically on Windows. > > Not entirely - there are some core settings that control it, but it is not > clear how they affect the behavior. My current setup in .gitconfig is shown > below: > > [core] > autocrlf = input > filemode = false > > > I have been using it so far without any problems - it is only after the > Maven auto-formatting plugin was added that I am encountering problems. >
Re: Autoformat source code issue
>> I thought GIT does this automatically on Windows. Not entirely - there are some core settings that control it, but it is not clear how they affect the behavior. My current setup in .gitconfig is shown below: [core] autocrlf = input filemode = false I have been using it so far without any problems - it is only after the Maven auto-formatting plugin was added that I am encountering problems.
Re: Autoformat source code issue
I thought GIT does this automatically on Windows. On Mon, Apr 20, 2020 at 10:30 AM Lyor Goldstein wrote: > I have just fetched the latest master branch and built it on my Windows > machine and am getting as if all files have been changed - the change has > to do with LF -> CRLF change in all files. How do we prevent this from > happening? Personally I prefer LF, but let's make sure that building on > Linux or Windows does not affect the EOL... >
Autoformat source code issue
I have just fetched the latest master branch and built it on my Windows machine and am getting as if all files have been changed - the change has to do with LF -> CRLF change in all files. How do we prevent this from happening? Personally I prefer LF, but let's make sure that building on Linux or Windows does not affect the EOL...