{"action":"created","issue":{"url":"https://api.github.com/repos/git-lfs/git-lfs/issues/1726","repository_url":"https://api.github.com/repos/git-lfs/git-lfs","labels_url":"https://api.github.com/repos/git-lfs/git-lfs/issues/1726/labels{/name}","comments_url":"https://api.github.com/repos/git-lfs/git-lfs/issues/1726/comments","events_url":"https://api.github.com/repos/git-lfs/git-lfs/issues/1726/events","html_url":"https://github.com/git-lfs/git-lfs/issues/1726","id":192483136,"number":1726,"title":"lfs tracked files are sometimes incorrectly shown as modified in \"git status\" output","user":{"login":"AndrewJDR","id":1588857,"avatar_url":"https://avatars.githubusercontent.com/u/1588857?v=3","gravatar_id":"","url":"https://api.github.com/users/AndrewJDR","html_url":"https://github.com/AndrewJDR","followers_url":"https://api.github.com/users/AndrewJDR/followers","following_url":"https://api.github.com/users/AndrewJDR/following{/other_user}","gists_url":"https://api.github.com/users/AndrewJDR/gists{/gist_id}","starred_url":"https://api.github.com/users/AndrewJDR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndrewJDR/subscriptions","organizations_url":"https://api.github.com/users/AndrewJDR/orgs","repos_url":"https://api.github.com/users/AndrewJDR/repos","events_url":"https://api.github.com/users/AndrewJDR/events{/privacy}","received_events_url":"https://api.github.com/users/AndrewJDR/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":21,"created_at":"2016-11-30T06:06:23Z","updated_at":"2016-12-08T11:00:16Z","closed_at":null,"body":"I relatively frequently run into a situation where ```git status``` will show one or more lfs-tracked files as being modified when they are not in fact modified. I have yet to nail down exact reproduction steps, but I do have some bits of information about it:\r\n\r\n- ```git checkout -- <the lfs tracked files>``` Will **not** resolve the issue; The files will still be shown as modified in an immediately subsequent ```git status``` output.\r\n- It can be \"fixed\" by doing the following:\r\n  * Emptying the .gitatttributes file (i.e. run ```cp /dev/null .gitattributes``` or similar)\r\n  * Running ```git status```\r\n  * Running ```git checkout -- .gitattributes``` (Restores the .gitattributes file)\r\n  * Running ```git status``` again. The lfs-tracked files are now not shown as being modified anymore, as expected.\r\n  * (Note that these steps did **not** include a step like ```git checkout -- <lfs tracked files>```, which tells me the files were indeed completely unmodified the entire time.)\r\n- It seems like problem might occur immediately after a ```git reset --hard <tree-ish>``` or ```git checkout <tree-ish>```, but I am not 100% sure on this.\r\n\r\nHas anyone else encountered this?"},"comment":{"url":"https://api.github.com/repos/git-lfs/git-lfs/issues/comments/265713523","html_url":"https://github.com/git-lfs/git-lfs/issues/1726#issuecomment-265713523","issue_url":"https://api.github.com/repos/git-lfs/git-lfs/issues/1726","id":265713523,"user":{"login":"AndrewJDR","id":1588857,"avatar_url":"https://avatars.githubusercontent.com/u/1588857?v=3","gravatar_id":"","url":"https://api.github.com/users/AndrewJDR","html_url":"https://github.com/AndrewJDR","followers_url":"https://api.github.com/users/AndrewJDR/followers","following_url":"https://api.github.com/users/AndrewJDR/following{/other_user}","gists_url":"https://api.github.com/users/AndrewJDR/gists{/gist_id}","starred_url":"https://api.github.com/users/AndrewJDR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndrewJDR/subscriptions","organizations_url":"https://api.github.com/users/AndrewJDR/orgs","repos_url":"https://api.github.com/users/AndrewJDR/repos","events_url":"https://api.github.com/users/AndrewJDR/events{/privacy}","received_events_url":"https://api.github.com/users/AndrewJDR/received_events","type":"User","site_admin":false},"created_at":"2016-12-08T11:00:16Z","updated_at":"2016-12-08T11:00:16Z","body":"Just to head off any \"Why are you tracking symlinks in git-lfs?\" type questions:\r\n\r\nI often have repositories where i check in large numbers of libraries (.so files, .a files, etc). It's very common for these .so/.a files to be accompanied by symlinks so that any programs depending upon those libraries can more easily find the libraries they're looking for.\r\n\r\nThe build scripts for these libraries generate many dozens of these library symlinks, and they change over time when I build new versions, so manually maintaining which .a and .so files to track would be very cumbersome -- The easiest thing is to just ```git lfs track \"*.a\"``` and ```git lfs track \"*.so\"``` and call it a day. \r\n\r\nSo that's what I do :)\r\n\r\n"}}
{"actor":{"display_login":"AndrewJDR"}}