{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/cargo/issues/2076","labels_url":"https://api.github.com/repos/rust-lang/cargo/issues/2076/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/cargo/issues/2076/comments","events_url":"https://api.github.com/repos/rust-lang/cargo/issues/2076/events","html_url":"https://github.com/rust-lang/cargo/issues/2076","id":112893854,"number":2076,"title":"Git's autocrlf-true interacts badly with cargo rewriting the lockfile","user":{"login":"gkoz","id":4260361,"avatar_url":"https://avatars.githubusercontent.com/u/4260361?v=3","gravatar_id":"","url":"https://api.github.com/users/gkoz","html_url":"https://github.com/gkoz","followers_url":"https://api.github.com/users/gkoz/followers","following_url":"https://api.github.com/users/gkoz/following{/other_user}","gists_url":"https://api.github.com/users/gkoz/gists{/gist_id}","starred_url":"https://api.github.com/users/gkoz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gkoz/subscriptions","organizations_url":"https://api.github.com/users/gkoz/orgs","repos_url":"https://api.github.com/users/gkoz/repos","events_url":"https://api.github.com/users/gkoz/events{/privacy}","received_events_url":"https://api.github.com/users/gkoz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-10-22T21:19:18Z","updated_at":"2015-10-26T16:25:41Z","closed_at":null,"body":"If `git` has `core.autocrlf=true` (a reasonable thing on Windows) it checks out `Cargo.lock` with `CRLF` line endings. The next time `cargo` touches the file, it changes the line endings to `LF` making `git` think that it has changed.\r\n\r\nSome possible solutions/remedies:\r\n- preserve the line endings in `Cargo.lock` (perhaps not exactly preserve but detect the kind from the first line);\r\n- in `cargo new --bin` create `.gitattributes` with the line `Cargo.lock eol=lf`;\r\n- document this issue somewhere."},"comment":{"url":"https://api.github.com/repos/rust-lang/cargo/issues/comments/151196357","html_url":"https://github.com/rust-lang/cargo/issues/2076#issuecomment-151196357","issue_url":"https://api.github.com/repos/rust-lang/cargo/issues/2076","id":151196357,"user":{"login":"alexcrichton","id":64996,"avatar_url":"https://avatars.githubusercontent.com/u/64996?v=3","gravatar_id":"","url":"https://api.github.com/users/alexcrichton","html_url":"https://github.com/alexcrichton","followers_url":"https://api.github.com/users/alexcrichton/followers","following_url":"https://api.github.com/users/alexcrichton/following{/other_user}","gists_url":"https://api.github.com/users/alexcrichton/gists{/gist_id}","starred_url":"https://api.github.com/users/alexcrichton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexcrichton/subscriptions","organizations_url":"https://api.github.com/users/alexcrichton/orgs","repos_url":"https://api.github.com/users/alexcrichton/repos","events_url":"https://api.github.com/users/alexcrichton/events{/privacy}","received_events_url":"https://api.github.com/users/alexcrichton/received_events","type":"User","site_admin":false},"created_at":"2015-10-26T16:25:41Z","updated_at":"2015-10-26T16:25:41Z","body":"Ok, I think I'm convinced that we should move forward with this, feel free to submit a PR @gkoz!"}}