{"action":"created","issue":{"url":"https://api.github.com/repos/github/git-lfs/issues/1057","repository_url":"https://api.github.com/repos/github/git-lfs","labels_url":"https://api.github.com/repos/github/git-lfs/issues/1057/labels{/name}","comments_url":"https://api.github.com/repos/github/git-lfs/issues/1057/comments","events_url":"https://api.github.com/repos/github/git-lfs/issues/1057/events","html_url":"https://github.com/github/git-lfs/issues/1057","id":138052694,"number":1057,"title":"Lfs detection inconsistent","user":{"login":"dnewmarch","id":8184488,"avatar_url":"https://avatars.githubusercontent.com/u/8184488?v=3","gravatar_id":"","url":"https://api.github.com/users/dnewmarch","html_url":"https://github.com/dnewmarch","followers_url":"https://api.github.com/users/dnewmarch/followers","following_url":"https://api.github.com/users/dnewmarch/following{/other_user}","gists_url":"https://api.github.com/users/dnewmarch/gists{/gist_id}","starred_url":"https://api.github.com/users/dnewmarch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dnewmarch/subscriptions","organizations_url":"https://api.github.com/users/dnewmarch/orgs","repos_url":"https://api.github.com/users/dnewmarch/repos","events_url":"https://api.github.com/users/dnewmarch/events{/privacy}","received_events_url":"https://api.github.com/users/dnewmarch/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-03-03T02:10:54Z","updated_at":"2016-03-04T03:07:45Z","closed_at":"2016-03-03T09:38:01Z","body":"I'm using Ubuntu 14.04, git version 1.9.1, git-lfs/1.1.1 (GitHub; linux amd64; go 1.5.3).\r\nI seem to be able to create a situation where a committed binary file doesn't get picked up by lfs when lfs tracking is added later.  I've used the following series of commands to demonstrate the issue:\r\n```\r\ngit init git-lfs-bug\r\ncd git-lfs-bug\r\necho 0 > lfs.bin\r\ngit add lfs.bin\r\ngit commit -m \"add binary file\"\r\ngit lfs track *.bin\r\ngit add .gitattributes\r\ngit commit -m \"track with lfs\"\r\n````\r\nAfter this series of commands I expect that the lfs.bin file should be identified as modified, because it is matched by the git lfs tracking pattern, but the pointer file hasn't been committed yet.  However, when I run git status it says there are no modifications.  And if I run gitk it shows two commits, and no modified files.  Interestingly, gitk shows the first commit as adding a pointer file, which is also incorrect.  \r\n\r\nOne last detail is that I tried adding the above commands to a shell script and running them that way, but when run from the script the problem did not happen, ie. git status reports lfs.bin as modified and wants me to commit the pointer file."},"comment":{"url":"https://api.github.com/repos/github/git-lfs/issues/comments/192075530","html_url":"https://github.com/github/git-lfs/issues/1057#issuecomment-192075530","issue_url":"https://api.github.com/repos/github/git-lfs/issues/1057","id":192075530,"user":{"login":"dnewmarch","id":8184488,"avatar_url":"https://avatars.githubusercontent.com/u/8184488?v=3","gravatar_id":"","url":"https://api.github.com/users/dnewmarch","html_url":"https://github.com/dnewmarch","followers_url":"https://api.github.com/users/dnewmarch/followers","following_url":"https://api.github.com/users/dnewmarch/following{/other_user}","gists_url":"https://api.github.com/users/dnewmarch/gists{/gist_id}","starred_url":"https://api.github.com/users/dnewmarch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dnewmarch/subscriptions","organizations_url":"https://api.github.com/users/dnewmarch/orgs","repos_url":"https://api.github.com/users/dnewmarch/repos","events_url":"https://api.github.com/users/dnewmarch/events{/privacy}","received_events_url":"https://api.github.com/users/dnewmarch/received_events","type":"User","site_admin":false},"created_at":"2016-03-04T03:07:45Z","updated_at":"2016-03-04T03:07:45Z","body":"I was nearly going to leave the issue, but I got bitten by another scenario today.\r\nIn an attempt to avoid the confusion surrounding unconverted git blobs, we touched all the files which would match our git lfs tracking rules.  This caused them to be converted to pointers which we committed to master.  But now when I go from master where the conversion has happened to an older branch, all of the bin files which we just converted are marked as modified.  As far as I understand my only options to get out of this state are to commit the files, or force checkout master again.  So I can resolve it, but once again it's awkward and unexpected so I thought it was worth mentioning."}}