Skip to content

Commit

Permalink
Save progress before the tornado wipes my computer
Browse files Browse the repository at this point in the history
  • Loading branch information
creationix committed May 21, 2013
1 parent bf7e398 commit 66d3bf4
Show file tree
Hide file tree
Showing 17 changed files with 17 additions and 89 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@
[submodule "deps/leb128-frame"]
path = deps/leb128-frame
url = https://github.com/creationix/leb128-frame
[submodule "app"]
path = app
url = git@github.com:creationix/js-git-app.git
1 change: 1 addition & 0 deletions app
Submodule app added at 7d1522
16 changes: 0 additions & 16 deletions app/background.js

This file was deleted.

Binary file removed app/icons/icon-128.png
Binary file not shown.
Binary file removed app/icons/icon-16.png
Binary file not shown.
Binary file removed app/icons/icon-256.png
Binary file not shown.
Binary file removed app/icons/icon-512.png
Binary file not shown.
11 changes: 0 additions & 11 deletions app/index.html

This file was deleted.

2 changes: 1 addition & 1 deletion deps/bops
Submodule bops updated 1 files
+593 −0 dist/bops.js
2 changes: 1 addition & 1 deletion deps/leb128-frame
Submodule leb128-frame updated 5 files
+6 −0 .travis.yml
+12 −0 README.md
+56 −16 leb128.js
+19 −9 package.json
+115 −0 test.js
2 changes: 1 addition & 1 deletion deps/min-stream-chrome
2 changes: 1 addition & 1 deletion deps/min-stream-helpers
2 changes: 1 addition & 1 deletion deps/min-stream-pkt-line
20 changes: 2 additions & 18 deletions app/main.js → http-server.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@
"use strict";

require('git-fs-html5')(function (err, fs) {
if (err) throw err;
window.fs = fs;
require('git-db-fs')(fs, "/.gitdb", function (err, db) {
if (err) throw err;
window.db = db;
});
});

console.log(
"Welcome to the js-git demo.\n" +
"There are some global objects you can use to manipulate the sandbox.\n" +
"They are `fs`, `git`, and `db`.\n" +
"Use auto-complete to explore their capabilities"
);

var tcp = require('min-stream-chrome');
var tcp = require('min-stream-node');
var helpers = require('min-stream-helpers');
var http = require('min-stream-http-codec');

Expand All @@ -29,7 +13,7 @@ var app = function (respond) {
statusCode: 200,
headers: [
"Content-Length", "12",
"Server", navigator.userAgent,
"Server", "node.js " + process.version,
"Date", (new Date()).toUTCString()
]
});
Expand Down
32 changes: 0 additions & 32 deletions manifest.json

This file was deleted.

9 changes: 4 additions & 5 deletions node-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var bops = require('bops');

function lsRemote(host, path) {

tcp.connect(host, 3000, function (err, client) {
tcp.connect(host, 9418, function (err, client) {
if (err) throw err;

console.log("Connected to %s, sending git-upload-pack request", host);
Expand All @@ -33,11 +33,10 @@ function lsRemote(host, path) {
console.log({refs:refs,caps:caps});
var clientCaps = [
// "multi_ack_detailed",
// "side-band-64k",
"side-band-64k",
// "thin-pack",
// "ofs-delta",
"agent=js-git/0.0.0"
// "agent=git/1.8.1.2"
];
emit(null, pktLine.encode(["want", refs.HEAD].concat(clientCaps)));
// emit(null, pktLine.encode(["want", refs["refs/heads/master"]]));
Expand All @@ -54,7 +53,7 @@ function lsRemote(host, path) {
refs[message[1]] = message[0];
},
"pack": function (message) {

// throw new Error
}
};
emit(null, pktLine.encode(["git-upload-pack", path], {host: host}, true));
Expand All @@ -72,4 +71,4 @@ function toString(value) {
return bops.to(value);
}

lsRemote("localhost", "/conquest.git");
lsRemote("github.com", "/creationix/conquest.git");
4 changes: 2 additions & 2 deletions proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ function onConnection(err, local) {
helpers.run([
helpers.joiner([
helpers.mapToPull(function (item) {
return [ "local", item ];
return [ 0, item ];
})(localGen()),
helpers.mapToPull(function (item) {
return [ "remote", item ];
return [ 1, item ];
})(remoteGen()),
]),
function (item) {
Expand Down

0 comments on commit 66d3bf4

Please sign in to comment.