{"action":"created","issue":{"url":"https://api.github.com/repos/novemberborn/package-hash/issues/5","repository_url":"https://api.github.com/repos/novemberborn/package-hash","labels_url":"https://api.github.com/repos/novemberborn/package-hash/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/novemberborn/package-hash/issues/5/comments","events_url":"https://api.github.com/repos/novemberborn/package-hash/issues/5/events","html_url":"https://github.com/novemberborn/package-hash/issues/5","id":155539952,"number":5,"title":"Git diff of nested directory","user":{"login":"vweevers","id":3055345,"avatar_url":"https://avatars.githubusercontent.com/u/3055345?v=3","gravatar_id":"","url":"https://api.github.com/users/vweevers","html_url":"https://github.com/vweevers","followers_url":"https://api.github.com/users/vweevers/followers","following_url":"https://api.github.com/users/vweevers/following{/other_user}","gists_url":"https://api.github.com/users/vweevers/gists{/gist_id}","starred_url":"https://api.github.com/users/vweevers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vweevers/subscriptions","organizations_url":"https://api.github.com/users/vweevers/orgs","repos_url":"https://api.github.com/users/vweevers/repos","events_url":"https://api.github.com/users/vweevers/events{/privacy}","received_events_url":"https://api.github.com/users/vweevers/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-05-18T16:01:16Z","updated_at":"2016-05-19T08:56:42Z","closed_at":null,"body":"Currently, a git diff is only included [if the directory is a repository](https://github.com/novemberborn/package-hash/blob/a1102d19f7a9f9bd58db50e2a21534fafba66f8e/src/index.js#L35):\r\n\r\n> Force the GIT_DIR to prevent git from diffing a parent repository in case the directory isn't actually a repository.\r\n\r\nHowever, in a monorepo, when you want the hash of a nested package (`packages/beep/package.json`) it would be useful to include the git diff of just that directory.\r\n\r\nWould you be open to doing `git diff HEAD .` (note the dot) instead? Could be an optional feature."},"comment":{"url":"https://api.github.com/repos/novemberborn/package-hash/issues/comments/220266152","html_url":"https://github.com/novemberborn/package-hash/issues/5#issuecomment-220266152","issue_url":"https://api.github.com/repos/novemberborn/package-hash/issues/5","id":220266152,"user":{"login":"novemberborn","id":33538,"avatar_url":"https://avatars.githubusercontent.com/u/33538?v=3","gravatar_id":"","url":"https://api.github.com/users/novemberborn","html_url":"https://github.com/novemberborn","followers_url":"https://api.github.com/users/novemberborn/followers","following_url":"https://api.github.com/users/novemberborn/following{/other_user}","gists_url":"https://api.github.com/users/novemberborn/gists{/gist_id}","starred_url":"https://api.github.com/users/novemberborn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/novemberborn/subscriptions","organizations_url":"https://api.github.com/users/novemberborn/orgs","repos_url":"https://api.github.com/users/novemberborn/repos","events_url":"https://api.github.com/users/novemberborn/events{/privacy}","received_events_url":"https://api.github.com/users/novemberborn/received_events","type":"User","site_admin":false},"created_at":"2016-05-19T08:56:42Z","updated_at":"2016-05-19T08:56:42Z","body":"I don't think your requirements are in scope for `package-hash`. Feel free to extract the underlying code into a separate package though, perhaps `package-hash` could even depend on it."}}