| CARVIEW |
Select Language
HTTP/2 200
server: nginx
date: Tue, 23 Dec 2025 13:16:32 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.681485, exclusion.robots;dur=0.078733, exclusion.robots.policy;dur=0.068663, esindex;dur=0.012019, cdx.remote;dur=13.818875, LoadShardBlock;dur=302.667447, PetaboxLoader3.resolve;dur=155.190247, PetaboxLoader3.datanode;dur=186.365819, load_resource;dur=153.014882
x-app-server: wwwb-app211-dc8
x-ts: 200
x-tr: 529
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: wb-p-SERVER=wwwb-app211; 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=()
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();
});
