{"action":"created","issue":{"url":"https://api.github.com/repos/github/git-lfs/issues/616","labels_url":"https://api.github.com/repos/github/git-lfs/issues/616/labels{/name}","comments_url":"https://api.github.com/repos/github/git-lfs/issues/616/comments","events_url":"https://api.github.com/repos/github/git-lfs/issues/616/events","html_url":"https://github.com/github/git-lfs/issues/616","id":103752224,"number":616,"title":"Proposal: Drop smudge in favor of post-checkout hook","user":{"login":"technoweenie","id":21,"avatar_url":"https://avatars.githubusercontent.com/u/21?v=3","gravatar_id":"","url":"https://api.github.com/users/technoweenie","html_url":"https://github.com/technoweenie","followers_url":"https://api.github.com/users/technoweenie/followers","following_url":"https://api.github.com/users/technoweenie/following{/other_user}","gists_url":"https://api.github.com/users/technoweenie/gists{/gist_id}","starred_url":"https://api.github.com/users/technoweenie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/technoweenie/subscriptions","organizations_url":"https://api.github.com/users/technoweenie/orgs","repos_url":"https://api.github.com/users/technoweenie/repos","events_url":"https://api.github.com/users/technoweenie/events{/privacy}","received_events_url":"https://api.github.com/users/technoweenie/received_events","type":"User","site_admin":true},"labels":[{"url":"https://api.github.com/repos/github/git-lfs/labels/roadmap","name":"roadmap","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":26,"created_at":"2015-08-28T16:35:08Z","updated_at":"2015-10-06T09:54:02Z","closed_at":null,"body":"The improvements of the batch API and the updated `fetch` command are wasted on the Git smudge filters. Each checked out file has to invoke `smudge`, which only operates on a single file at a time. There's no parallelism here (unless Git adds it). \r\n\r\nThe `post-checkout` hook runs after a `git checkout` is run after updating the work tree. The hook can then call `git lfs pull`, which downloads the LFS objects for the current working directory and replaces the pointers. This means it can make full use of the batch API and concurrent transfers.\r\n\r\nSome downsides:\r\n\r\n1. Cloning is more difficult. I don't know of a way to clone with a `post-checkout` hook. We could solve this with a `git lfs clone` wrapper. \r\n2. What happens if users have their own `post-checkout` scripts? I know that the Unreal Engine uses one, for example. Git needs a way for multiple tools to add their hooks in harmony. "},"comment":{"url":"https://api.github.com/repos/github/git-lfs/issues/comments/145804046","html_url":"https://github.com/github/git-lfs/issues/616#issuecomment-145804046","issue_url":"https://api.github.com/repos/github/git-lfs/issues/616","id":145804046,"user":{"login":"bozaro","id":2458138,"avatar_url":"https://avatars.githubusercontent.com/u/2458138?v=3","gravatar_id":"","url":"https://api.github.com/users/bozaro","html_url":"https://github.com/bozaro","followers_url":"https://api.github.com/users/bozaro/followers","following_url":"https://api.github.com/users/bozaro/following{/other_user}","gists_url":"https://api.github.com/users/bozaro/gists{/gist_id}","starred_url":"https://api.github.com/users/bozaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bozaro/subscriptions","organizations_url":"https://api.github.com/users/bozaro/orgs","repos_url":"https://api.github.com/users/bozaro/repos","events_url":"https://api.github.com/users/bozaro/events{/privacy}","received_events_url":"https://api.github.com/users/bozaro/received_events","type":"User","site_admin":false},"created_at":"2015-10-06T09:54:02Z","updated_at":"2015-10-06T09:54:02Z","body":"To understand the scale of the problem with handshakes I clone my micro repostory (https://github.com/bozaro/test) with single lfs file:\r\n```\r\ntime git lfs fetch\r\nFetching master\r\n(1 of 1 files) 33.64 KB / 40.27 KB\r\n\r\nreal\t0m1.779s\r\nuser\t0m0.032s\r\nsys\t0m0.008s\r\n```"}}