isaacs/npm — pull request #3344 by guybrush (2013-04-13 07:08:08+00:00)
Title: cache: handle git-submodules in git-dependencies

Fix #1876

this is another approach besides #3343

```
1. cacheDir = path.join(cache,'_git-remotes',sha1(u))
2. checkGitDir(cacheDir) ? 4. : 3. (rm cacheDir if necessary)
3. git clone u cacheDir
4. git fetch -a origin (cwd: cacheDir)
7. git checkout (cwd: cacheDir)
8. git submodule update --init --recursive (cwd: cacheDir)
9. addLocalDirectory(cacheDir)
```