{"action":"created","issue":{"url":"https://api.github.com/repos/gitlabhq/gitlabhq/issues/3982","labels_url":"https://api.github.com/repos/gitlabhq/gitlabhq/issues/3982/labels{/name}","comments_url":"https://api.github.com/repos/gitlabhq/gitlabhq/issues/3982/comments","events_url":"https://api.github.com/repos/gitlabhq/gitlabhq/issues/3982/events","html_url":"https://github.com/gitlabhq/gitlabhq/issues/3982","id":14471682,"number":3982,"title":"Webbased editor changes all end-of-line markers.","user":{"login":"nielsbasjes","id":240096,"avatar_url":"https://avatars.githubusercontent.com/u/240096?v=3","gravatar_id":"","url":"https://api.github.com/users/nielsbasjes","html_url":"https://github.com/nielsbasjes","followers_url":"https://api.github.com/users/nielsbasjes/followers","following_url":"https://api.github.com/users/nielsbasjes/following{/other_user}","gists_url":"https://api.github.com/users/nielsbasjes/gists{/gist_id}","starred_url":"https://api.github.com/users/nielsbasjes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nielsbasjes/subscriptions","organizations_url":"https://api.github.com/users/nielsbasjes/orgs","repos_url":"https://api.github.com/users/nielsbasjes/repos","events_url":"https://api.github.com/users/nielsbasjes/events{/privacy}","received_events_url":"https://api.github.com/users/nielsbasjes/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"randx","id":305940,"avatar_url":"https://avatars.githubusercontent.com/u/305940?v=3","gravatar_id":"","url":"https://api.github.com/users/randx","html_url":"https://github.com/randx","followers_url":"https://api.github.com/users/randx/followers","following_url":"https://api.github.com/users/randx/following{/other_user}","gists_url":"https://api.github.com/users/randx/gists{/gist_id}","starred_url":"https://api.github.com/users/randx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/randx/subscriptions","organizations_url":"https://api.github.com/users/randx/orgs","repos_url":"https://api.github.com/users/randx/repos","events_url":"https://api.github.com/users/randx/events{/privacy}","received_events_url":"https://api.github.com/users/randx/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/gitlabhq/gitlabhq/milestones/22","html_url":"https://github.com/gitlabhq/gitlabhq/milestones/6.0","labels_url":"https://api.github.com/repos/gitlabhq/gitlabhq/milestones/22/labels","id":332793,"number":22,"title":"6.0","description":"","creator":{"login":"randx","id":305940,"avatar_url":"https://avatars.githubusercontent.com/u/305940?v=3","gravatar_id":"","url":"https://api.github.com/users/randx","html_url":"https://github.com/randx","followers_url":"https://api.github.com/users/randx/followers","following_url":"https://api.github.com/users/randx/following{/other_user}","gists_url":"https://api.github.com/users/randx/gists{/gist_id}","starred_url":"https://api.github.com/users/randx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/randx/subscriptions","organizations_url":"https://api.github.com/users/randx/orgs","repos_url":"https://api.github.com/users/randx/repos","events_url":"https://api.github.com/users/randx/events{/privacy}","received_events_url":"https://api.github.com/users/randx/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":13,"state":"closed","created_at":"2013-05-13T16:07:31Z","updated_at":"2013-08-19T15:55:11Z","due_on":null,"closed_at":"2013-08-19T15:55:11Z"},"comments":22,"created_at":"2013-05-17T21:11:10Z","updated_at":"2015-12-04T22:29:01Z","closed_at":"2013-08-03T08:35:48Z","body":"**Summary:** Editing a file using the webbased editor changes the line endings to what the browser uses.\r\n\r\n**Steps to reproduce:** I create a text file (i.e. some sourcecode using vim) under Linux and commit and push it to a git repo under gitlab.\r\nThen I see a small typo and edit the file using the webbased editor from my Chrome under Windows 7.\r\nAfter I commit the changed file it turns out that ALL lines of the file have been changed because the \"UNIX\" end-of-line has been replaced with the \"Windows\" end-of-line.\r\n\r\n**Expected behavior:** The line endings of the untouched lines remain unchanged.\r\nI'm unsure what the behaviour of changed and new lines should be.\r\n\r\n**Observed behavior:** ALL line endings have changed into \"Windows style\" when editing under windows.\r\n\r\n**Relevant logs and/or screen shots:**\r\nWhen I look in the change set of a commit  did as a test (I changed nothing, I just did a commit from the webeditor) on a file with 7 lines:\r\n\"Showing 0 changed files\"  and  \"This commit has 7 additions and 7 deletions\"\r\n\r\n**Output of checks**\r\nResults of GitLab Application Check (sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production); we will only investigate if the tests are passing\r\n\r\nAll tests are passing. Only a single unimportant notice about the init.d script not being up to date.\r\n\r\n**Version of GitLab you are running**;   5.2.0 02a7b12\r\nDescribe your setup (use relevant parts from sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production)\r\nCentOS 6.4, Git 1.8.3.1\r\n\r\n**Possible fixes:**\r\nHave a setting next to the \"Save\" button of the webeditor that specifies the desired line endings (Unix/Dos/Mac/...), then at save of the webeditor forces this on the entire file. The setting should default to the line ending type that occurs most in the given file."},"comment":{"url":"https://api.github.com/repos/gitlabhq/gitlabhq/issues/comments/162099878","html_url":"https://github.com/gitlabhq/gitlabhq/issues/3982#issuecomment-162099878","issue_url":"https://api.github.com/repos/gitlabhq/gitlabhq/issues/3982","id":162099878,"user":{"login":"docwhat","id":40799,"avatar_url":"https://avatars.githubusercontent.com/u/40799?v=3","gravatar_id":"","url":"https://api.github.com/users/docwhat","html_url":"https://github.com/docwhat","followers_url":"https://api.github.com/users/docwhat/followers","following_url":"https://api.github.com/users/docwhat/following{/other_user}","gists_url":"https://api.github.com/users/docwhat/gists{/gist_id}","starred_url":"https://api.github.com/users/docwhat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docwhat/subscriptions","organizations_url":"https://api.github.com/users/docwhat/orgs","repos_url":"https://api.github.com/users/docwhat/repos","events_url":"https://api.github.com/users/docwhat/events{/privacy}","received_events_url":"https://api.github.com/users/docwhat/received_events","type":"User","site_admin":false},"created_at":"2015-12-04T22:29:01Z","updated_at":"2015-12-04T22:29:01Z","body":"@ariehorst If you create a `gitattributes` file in your repo, it will solve a lot of problems. "}}