function resolveFromGit (nodeModules, parentTarget, parsedSpec) {
	const {raw, type, spec} = parsedSpec
	log(`resolving ${raw} from git`)

	const [protocol, host] = spec.split('://')
	const [repo, ref = 'master'] = host.split('#')

	// create shasum from spec for storage
	const hash = crypto.createHash('sha1')
	hash.update(spec)
	const shasum = hash.digest('hex')
	let repoPath

	return git.clone(repo, ref)
		::mergeMap(tmpDest => {
			repoPath = tmpDest
			return util.readFileJSON(path.resolve(tmpDest, 'package.json'))
		})
		::map(pkgJson => {
			const name = pkgJson.name
			pkgJson.dist = {shasum, path: repoPath} // eslint-disable-line no-param-reassign
			log(`resolved ${name}@${ref} to spec shasum ${shasum} from git`)
			return {parentTarget, pkgJson, target: shasum, name, type, fetch: git.extract}
		})
}
resolve a dependency's `package.json` file from a git endpoint.
@param	{String} nodeModules - `node_modules` base directory.
@param	{String} parentTarget - relative parent's node_modules path.
@param	{Object} parsedSpec - parsed package name and specifier.
@return {Observable} - observable sequence of `package.json` objects.