X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=org.simantics.maps.server%2Fnode%2Fnode-v4.8.0-win-x64%2Fnode_modules%2Fnpm%2Fnode_modules%2Fnormalize-git-url%2FREADME.md;fp=org.simantics.maps.server%2Fnode%2Fnode-v4.8.0-win-x64%2Fnode_modules%2Fnpm%2Fnode_modules%2Fnormalize-git-url%2FREADME.md;h=da3d78ed25cab9a9792aec2b4e5e3be9188c13e9;hb=2529be6d456deeb07c128603ce4971f1dc29b695;hp=0000000000000000000000000000000000000000;hpb=2636fc31c16c23711cf2b06a4ae8537bba9c1d35;p=simantics%2Fdistrict.git diff --git a/org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/normalize-git-url/README.md b/org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/normalize-git-url/README.md new file mode 100644 index 00000000..da3d78ed --- /dev/null +++ b/org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/normalize-git-url/README.md @@ -0,0 +1,40 @@ +# normalize-git-url + +You have a bunch of Git URLs. You want to convert them to a canonical +representation, probably for use inside npm so that it doesn't end up creating +a bunch of superfluous cached origins. You use this package. + +## Usage + +```javascript +var ngu = require('normalize-git-url'); +var normalized = ngu("git+ssh://git@github.com:organization/repo.git#hashbrowns") +// get back: +// { +// url : "ssh://git@github.com/organization/repo.git", +// branch : "hashbrowns" // did u know hashbrowns are delicious? +// } +``` + +## API + +There's just the one function, and all it takes is a single parameter, a non-normalized Git URL. + +### normalizeGitUrl(url) + +* `url` {String} The Git URL (very loosely speaking) to be normalized. + +Returns an object with the following format: + +* `url` {String} The normalized URL. +* `branch` {String} The treeish to be checked out once the repo at `url` is + cloned. It doesn't have to be a branch, but it's a lot easier to intuit what + the output is for with that name. + +## Limitations + +Right now this doesn't try to special-case GitHub too much -- it doesn't ensure +that `.git` is added to the end of URLs, it doesn't prefer `https:` over +`http:` or `ssh:`, it doesn't deal with redirects, and it doesn't try to +resolve symbolic names to treeish hashcodes. For now, it just tries to account +for minor differences in representation.