| CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Mon, 22 Dec 2025 19:22:45 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20100526160720
location: https://web.archive.org/web/20100526160720/https://github.com/creationix/node-git
server-timing: captures_list;dur=0.636895, exclusion.robots;dur=0.050853, exclusion.robots.policy;dur=0.038236, esindex;dur=0.011294, cdx.remote;dur=7.039254, LoadShardBlock;dur=645.199922, PetaboxLoader3.datanode;dur=64.613196, PetaboxLoader3.resolve;dur=73.462666
x-app-server: wwwb-app227-dc8
x-ts: 302
x-tr: 677
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: wb-p-SERVER=wwwb-app227; path=/
x-location: All
x-as: 14061
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 200
server: nginx
date: Mon, 22 Dec 2025 19:22:46 GMT
content-type: text/html; charset=utf-8
x-archive-orig-server: nginx/0.7.61
x-archive-orig-date: Wed, 26 May 2010 16:07:20 GMT
x-archive-orig-connection: close
x-archive-orig-status: 200 OK
x-archive-orig-etag: "db315ed0179598fe46117258ea7082fa"
x-archive-orig-x-runtime: 55ms
x-archive-orig-content-length: 19152
x-archive-orig-cache-control: private, max-age=0, must-revalidate
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: utf-8
memento-datetime: Wed, 26 May 2010 16:07:20 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: 51_16_20100526112330_crawl101-c/51_16_20100526160633_crawl101.arc.gz
server-timing: captures_list;dur=0.497072, exclusion.robots;dur=0.019750, exclusion.robots.policy;dur=0.008177, esindex;dur=0.009723, cdx.remote;dur=8.691463, LoadShardBlock;dur=228.453746, PetaboxLoader3.datanode;dur=168.303556, PetaboxLoader3.resolve;dur=174.671920, load_resource;dur=180.260010
x-app-server: wwwb-app227-dc8
x-ts: 200
x-tr: 471
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
x-location: All
x-as: 14061
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
content-encoding: gzip
creationix's node-git at master - GitHub
creationix / node-git
- Source
- Commits
- Network (4)
- Issues (0)
- Downloads (2)
- Wiki (1)
- Graphs
-
Branch:
master
click here to add a description
click here to add a homepage
node-git /
| name | age | message | |
|---|---|---|---|
| |
README.markdown | Thu Apr 15 19:58:56 -0700 2010 | Add a log reader for files. [creationix] |
| |
lib/ | Wed Apr 28 08:38:54 -0700 2010 | When there is a file not found message from nod... [creationix] |
README.markdown
node-git
This is a thin wrapper around the command-line git command for use inside node applications. It's used primarily by the wheat blogging system to enable a running node.JS server to read files out of a git repository as if they were local files.
Example usage
var sys = require('sys'),
Git = require('git');
// Test it!
Git("/Users/tim/code/howtonode.org");
Git.exists("articles/control-flow-part-ii.markdown", function (err, tags) {
if (err) { throw(err); }
sys.p(tags);
});
Git.getTags(function (err, tags) {
if (err) { throw(err); }
Object.keys(tags).forEach(function (tag) {
Git.readDir("articles", tags[tag], function (err, contents) {
if (err) { throw(err); }
contents.files.forEach(function (file) {
file = Path.join("articles", file);
Git.readFile(file, tags[tag], function (err, text) {
if (err) { throw(err); }
sys.error("tag: " + tag + " sha1: " + tags[tag] + " file: " + file + " length: " + text.length);
});
});
});
});
});
More example:
var sys = require('sys');
// Git("/Users/tim/git/howtonode.org.git");
Git("/Users/tim/Code/howtonode.org");
Git.log("articles/what-is-this.markdown", function (err, data) {
if (err) throw err;
sys.p(data);
process.exit();
});
