You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2020/04/03 19:05:44 UTC

[GitHub] [netbeans] dmochalov opened a new pull request #2061: [NETBEANS-4108] fixed git -> ignore should add a new line at the end …

dmochalov opened a new pull request #2061: [NETBEANS-4108] fixed git -> ignore should add a new line at the end …
URL: https://github.com/apache/netbeans/pull/2061
 
 
   …of .gitignore file
   
   Simple two line changes and added auto test for that. For more information see the [issue](https://issues.apache.org/jira/browse/NETBEANS-4108) and recommendations on [SO](https://stackoverflow.com/questions/5813311/no-newline-at-end-of-file)
   
   The GitHub native client handles the new line correctly.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] eirikbakke commented on issue #2061: [NETBEANS-4108] fixed git -> ignore should add a new line at the end …

Posted by GitBox <gi...@apache.org>.
eirikbakke commented on issue #2061: [NETBEANS-4108] fixed git -> ignore should add a new line at the end …
URL: https://github.com/apache/netbeans/pull/2061#issuecomment-612443410
 
 
   @matthiasblaesing How do I confirm, in the GitHub interface, whether the right author/email will end up in the git log upon squash-and-merge?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] dmochalov commented on issue #2061: [NETBEANS-4108] fixed git -> ignore should add a new line at the end …

Posted by GitBox <gi...@apache.org>.
dmochalov commented on issue #2061: [NETBEANS-4108] fixed git -> ignore should add a new line at the end …
URL: https://github.com/apache/netbeans/pull/2061#issuecomment-612401286
 
 
   @eirikbakke   thank you for taking the time to review it. Changed the code accordingly to your comments.
   By the way, can I rerun manually Travis tasks? Do I need special rights to rerun it?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] matthiasblaesing commented on issue #2061: [NETBEANS-4108] fixed git -> ignore should add a new line at the end …

Posted by GitBox <gi...@apache.org>.
matthiasblaesing commented on issue #2061: [NETBEANS-4108] fixed git -> ignore should add a new line at the end …
URL: https://github.com/apache/netbeans/pull/2061#issuecomment-612446499
 
 
   Regarding the author information: Have a look at the profile page:
   On your page your full name and an Emailaddress is listed, on @dmochalov page none of that is present.
   
   For the restart button: Looks as if either github or travis lost access tokens - I was also missing the buttons, logging out of travis and in again fixed it.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] eirikbakke commented on a change in pull request #2061: [NETBEANS-4108] fixed git -> ignore should add a new line at the end …

Posted by GitBox <gi...@apache.org>.
eirikbakke commented on a change in pull request #2061: [NETBEANS-4108] fixed git -> ignore should add a new line at the end …
URL: https://github.com/apache/netbeans/pull/2061#discussion_r406426784
 
 

 ##########
 File path: ide/libs.git/test/unit/src/org/netbeans/libs/git/jgit/AbstractGitTestCase.java
 ##########
 @@ -132,6 +132,24 @@ protected String read(File file) throws IOException {
         return sb.toString();
     }
 
+    protected boolean containsCRorLF(File file) throws IOException {
+        BufferedReader r = null;
+        try {
+            r = new BufferedReader(new FileReader(file));
+            int i;
+            while((i = r.read()) >-1)
 
 Review comment:
   Space before "-".

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] eirikbakke commented on issue #2061: [NETBEANS-4108] fixed git -> ignore should add a new line at the end …

Posted by GitBox <gi...@apache.org>.
eirikbakke commented on issue #2061: [NETBEANS-4108] fixed git -> ignore should add a new line at the end …
URL: https://github.com/apache/netbeans/pull/2061#issuecomment-611713806
 
 
   Just make sure the Travis tests pass... (the failing ones probably just need to be restarted)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] dmochalov commented on issue #2061: [NETBEANS-4108] fixed git -> ignore should add a new line at the end …

Posted by GitBox <gi...@apache.org>.
dmochalov commented on issue #2061: [NETBEANS-4108] fixed git -> ignore should add a new line at the end …
URL: https://github.com/apache/netbeans/pull/2061#issuecomment-612480015
 
 
   @matthiasblaesing thank you for the detailed explanation.
   If followed this [guide ](https://cwiki.apache.org/confluence/display/NETBEANS/Submitting+Pull+Request+on+Apache+NetBeans) to setup git hub account. 
   It would be nice to include the recommendations for GitHub profile settings.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] eirikbakke commented on a change in pull request #2061: [NETBEANS-4108] fixed git -> ignore should add a new line at the end …

Posted by GitBox <gi...@apache.org>.
eirikbakke commented on a change in pull request #2061: [NETBEANS-4108] fixed git -> ignore should add a new line at the end …
URL: https://github.com/apache/netbeans/pull/2061#discussion_r406426877
 
 

 ##########
 File path: ide/libs.git/test/unit/src/org/netbeans/libs/git/jgit/AbstractGitTestCase.java
 ##########
 @@ -132,6 +132,24 @@ protected String read(File file) throws IOException {
         return sb.toString();
     }
 
+    protected boolean containsCRorLF(File file) throws IOException {
+        BufferedReader r = null;
+        try {
+            r = new BufferedReader(new FileReader(file));
+            int i;
+            while((i = r.read()) >-1)
+            {
+                if( i=='\n' || i=='\r')
 
 Review comment:
   Space before '=='

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] eirikbakke edited a comment on issue #2061: [NETBEANS-4108] fixed git -> ignore should add a new line at the end …

Posted by GitBox <gi...@apache.org>.
eirikbakke edited a comment on issue #2061: [NETBEANS-4108] fixed git -> ignore should add a new line at the end …
URL: https://github.com/apache/netbeans/pull/2061#issuecomment-612443410
 
 
   @matthiasblaesing How do I confirm, in the GitHub interface, whether the right author/email will end up in the git log upon squash-and-merge?
   
   Also, I'm not seeing the usual "restart" button on the Travis tests. Did something change recently?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] matthiasblaesing commented on issue #2061: [NETBEANS-4108] fixed git -> ignore should add a new line at the end …

Posted by GitBox <gi...@apache.org>.
matthiasblaesing commented on issue #2061: [NETBEANS-4108] fixed git -> ignore should add a new line at the end …
URL: https://github.com/apache/netbeans/pull/2061#issuecomment-612475333
 
 
   @dmochalov yes the author information of the commits is totally ok. The problem starts if someone chooses the "Squash and merge" button in github to merge. CLI git uses the author information from the commits to create the merged author information, github uses the information from the profile (at least from my observation) and if that is not public, the squashed commit will hold invalid information.
   
   In this case there are three options:
   
   1. The commits are not squashed (discussing this is more religion, that science)
   2. You as the original author squash the commit prior to merging (after review) and the committer merges that
   3. The committer does a manual merge with CLI git

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] dmochalov commented on issue #2061: [NETBEANS-4108] fixed git -> ignore should add a new line at the end …

Posted by GitBox <gi...@apache.org>.
dmochalov commented on issue #2061: [NETBEANS-4108] fixed git -> ignore should add a new line at the end …
URL: https://github.com/apache/netbeans/pull/2061#issuecomment-612473681
 
 
   > Regarding the author information: Have a look at the profile page:
   > On your page your full name and an Emailaddress is listed, on @dmochalov page none of that is present.
   
   @matthiasblaesing  added the info on my profile page.
   I thought that info in **.gitconfig** is enough for correct merging:
   ```
   [user]
   	name = Dmitry Mochalov
   	email = rigthcoder@gmail.com
   ```
   
   In git history it looks ok:
   ![image](https://user-images.githubusercontent.com/1295142/79050653-37879f00-7c34-11ea-8666-dff1ee2e6d0c.png)
   
   
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] matthiasblaesing commented on issue #2061: [NETBEANS-4108] fixed git -> ignore should add a new line at the end …

Posted by GitBox <gi...@apache.org>.
matthiasblaesing commented on issue #2061: [NETBEANS-4108] fixed git -> ignore should add a new line at the end …
URL: https://github.com/apache/netbeans/pull/2061#issuecomment-612410532
 
 
   Please do not squash-and-merge this - the github account seems not the provide the necessary information. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] eirikbakke commented on a change in pull request #2061: [NETBEANS-4108] fixed git -> ignore should add a new line at the end …

Posted by GitBox <gi...@apache.org>.
eirikbakke commented on a change in pull request #2061: [NETBEANS-4108] fixed git -> ignore should add a new line at the end …
URL: https://github.com/apache/netbeans/pull/2061#discussion_r406427269
 
 

 ##########
 File path: ide/libs.git/test/unit/src/org/netbeans/libs/git/jgit/AbstractGitTestCase.java
 ##########
 @@ -132,6 +132,24 @@ protected String read(File file) throws IOException {
         return sb.toString();
     }
 
+    protected boolean containsCRorLF(File file) throws IOException {
+        BufferedReader r = null;
+        try {
+            r = new BufferedReader(new FileReader(file));
+            int i;
+            while((i = r.read()) >-1)
+            {
+                if( i=='\n' || i=='\r')
+                    return true;
+            }
+        } finally {
+            if (r != null) {
+                r.close();
 
 Review comment:
   Better use try-with-resources.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists