{"action":"created","issue":{"url":"https://api.github.com/repos/npm/npm/issues/4191","labels_url":"https://api.github.com/repos/npm/npm/issues/4191/labels{/name}","comments_url":"https://api.github.com/repos/npm/npm/issues/4191/comments","events_url":"https://api.github.com/repos/npm/npm/issues/4191/events","html_url":"https://github.com/npm/npm/issues/4191","id":23294881,"number":4191,"title":"Don't *always* update Git dependencies.","user":{"login":"domenic","id":617481,"avatar_url":"https://avatars.githubusercontent.com/u/617481?v=3","gravatar_id":"","url":"https://api.github.com/users/domenic","html_url":"https://github.com/domenic","followers_url":"https://api.github.com/users/domenic/followers","following_url":"https://api.github.com/users/domenic/following{/other_user}","gists_url":"https://api.github.com/users/domenic/gists{/gist_id}","starred_url":"https://api.github.com/users/domenic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/domenic/subscriptions","organizations_url":"https://api.github.com/users/domenic/orgs","repos_url":"https://api.github.com/users/domenic/repos","events_url":"https://api.github.com/users/domenic/events{/privacy}","received_events_url":"https://api.github.com/users/domenic/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/npm/npm/labels/feature-request","name":"feature-request","color":"ACE1AF"},{"url":"https://api.github.com/repos/npm/npm/labels/git","name":"git","color":"F34E31"},{"url":"https://api.github.com/repos/npm/npm/labels/i-wanna-be-the-very-best","name":"i-wanna-be-the-very-best","color":"006b75"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/npm/npm/milestones/5","html_url":"https://github.com/npm/npm/milestones/cache%20rewrite","labels_url":"https://api.github.com/repos/npm/npm/milestones/5/labels","id":730313,"number":5,"title":"cache rewrite","description":null,"creator":{"login":"othiym23","id":418097,"avatar_url":"https://avatars.githubusercontent.com/u/418097?v=3","gravatar_id":"","url":"https://api.github.com/users/othiym23","html_url":"https://github.com/othiym23","followers_url":"https://api.github.com/users/othiym23/followers","following_url":"https://api.github.com/users/othiym23/following{/other_user}","gists_url":"https://api.github.com/users/othiym23/gists{/gist_id}","starred_url":"https://api.github.com/users/othiym23/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/othiym23/subscriptions","organizations_url":"https://api.github.com/users/othiym23/orgs","repos_url":"https://api.github.com/users/othiym23/repos","events_url":"https://api.github.com/users/othiym23/events{/privacy}","received_events_url":"https://api.github.com/users/othiym23/received_events","type":"User","site_admin":false},"open_issues":29,"closed_issues":6,"state":"open","created_at":"2014-07-23T23:25:30Z","updated_at":"2015-04-18T06:47:16Z","due_on":null,"closed_at":null},"comments":18,"created_at":"2013-11-26T05:37:12Z","updated_at":"2015-04-29T16:49:21Z","closed_at":null,"body":"In #4104, @robertkowalski fixed #1727 by making Git dependencies always update (i.e., always show as outdated). This is a big improvement over where we were, when they would never update! But it could be better.\r\n\r\nIdeally:\r\n\r\n\r\n- If package.json points to a commit hash and the local copy is already at that commit hash, do no HTTP requests.\r\n- If package.json points to a tag or branch name, go fetch the metadata for that tag/branch from the repo, and check if the commit hash matches the local one. If so, do a full tarball download and unpack; otherwise, do no further HTTP.\r\n- If package.json points to no tag (i.e. master), go fetch the metadata for master, and proceed as in the previous case.\r\n\r\nI'm not sure how much of this is possible given what information and technology we have available. (How do you tell what commit the local copy is on? What does 'getting metadata\" mean? Are there easy ways to do this stuff for GitHub, but not for arbitrary Git servers?) I would bet, though, that Git-based package managers like Bower or Volo have already figured this out."},"comment":{"url":"https://api.github.com/repos/npm/npm/issues/comments/97501614","html_url":"https://github.com/npm/npm/issues/4191#issuecomment-97501614","issue_url":"https://api.github.com/repos/npm/npm/issues/4191","id":97501614,"user":{"login":"estani","id":1331850,"avatar_url":"https://avatars.githubusercontent.com/u/1331850?v=3","gravatar_id":"","url":"https://api.github.com/users/estani","html_url":"https://github.com/estani","followers_url":"https://api.github.com/users/estani/followers","following_url":"https://api.github.com/users/estani/following{/other_user}","gists_url":"https://api.github.com/users/estani/gists{/gist_id}","starred_url":"https://api.github.com/users/estani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/estani/subscriptions","organizations_url":"https://api.github.com/users/estani/orgs","repos_url":"https://api.github.com/users/estani/repos","events_url":"https://api.github.com/users/estani/events{/privacy}","received_events_url":"https://api.github.com/users/estani/received_events","type":"User","site_admin":false},"created_at":"2015-04-29T16:49:21Z","updated_at":"2015-04-29T16:49:21Z","body":"+1 \"--cache-only\" or something that does not check anything (not only git) provided the already cached versions satisfied the requirements.\r\nThis also implies that once built, it will always build as long as the main dependencies are not modifed."}}