Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

update files to disable wildcard read

  • Loading branch information...
commit 304268b86ee6a3c8e071161f48a03a0633dd20d7 1 parent 8d3c591
@leonchen authored
View
1  bin/gitfs
@@ -10,7 +10,6 @@
// 3. read blob
// gitfs read <sha> file
// gitfs read <sha> dir/file
-// gitfs read <sha> "dir/**/*.xml"
// 4. raw
// gitfs raw "<git command>"
View
18 bin/nodefetcher
@@ -5,17 +5,9 @@ function debug(info) {
//console.log("DEBUG: ", info);
}
-var ram_source = '/Volumes/RamDisk/sr';
-var ext_source = '/Volumes/RamDisk/new';
-var hd_source = '/Users/chenronghua/workspace/scarecrow-rules';
-//var hd_source = '/Users/chenronghua/workspace/front'
+source = '/Volumes/RamDisk/sr';
-console.log(process.argv);
-
-var source = process.argv[2];
-if (source == 'ram') source = ram_source;
-if (source == 'ext') source = ext_source;
-if (source == 'hd') source = hd_source;
+//console.log(process.argv);
function readSHA(target, sha, type, cb) {
if (type instanceof Function) {
@@ -86,9 +78,9 @@ function listTree(sha, cb) {
});
}
-var sha = process.argv[3];
-var target = process.argv[4];
-var times = parseInt(process.argv[5] || 1);
+var sha = process.argv[2];
+var target = process.argv[3];
+var times = parseInt(process.argv[4] || 1);
var sTime = Date.now();
View
13 bin/rubyfetcher
@@ -4,12 +4,7 @@ def debug(info)
#puts "DEBUG: #{info.is_a?(String) ? info : info.inspect}"
end
-ram_source = '/Volumes/RamDisk/sr'
-hd_source = '/Users/chenronghua/workspace/scarecrow-rules'
-
-source = ARGV[0]
-source = ram_source if source == 'ram'
-source = hd_source if source == 'hd'
+source = '/Volumes/RamDisk/sr'
Dir.chdir(source)
debug "git repo: #{source}"
@@ -37,9 +32,9 @@ def readSHA(target, sha, type=nil)
end
-sha = ARGV[1]
-target = ARGV[2]
-times = (ARGV[3] || 1).to_i
+sha = ARGV[0]
+target = ARGV[1]
+times = (ARGV[2] || 1).to_i
start_time = Time.now.to_f
View
4 example/read.js
@@ -17,7 +17,8 @@ gf.read('HEAD', 'packages/poi.us/Address.js', function (err, tree) {
return t[1] == 'blob' ? [t[4], t[5].length] : [t[4], null];
}));
});
-
+/*
+ * wildcard matching doesn't work
gf.read('HEAD', 'packages/poi.us/*.js', function (err, tree) {
if (err) return console.log(err);
show('packages/poi.us/*.js', tree.map(function (t) {
@@ -31,6 +32,7 @@ gf.read('HEAD', 'packages/**/*.yml', function (err, tree) {
return t[1] == 'blob' ? [t[4], t[5].length] : [t[4], null];
}));
});
+*/
gf.read('HEAD', 'packages/poi.us', function (err, tree) {
if (err) return console.log(err);
View
1  example/ref.js
@@ -23,7 +23,6 @@ gf.sha('HEAD', function (err, sha) {
// head
gf.sha('feature/crow', function (err, sha) {
- console.log("---------", sha);
if (err) return show(err);
gf.read(sha, 'packages/poi.us/Address.js', function (err, tree) {
if (err) return console.log(err);
View
2  package.json
@@ -1,7 +1,7 @@
{
"name": "gitfs",
"description": "git data fetcher",
- "version": "0.0.5",
+ "version": "0.0.6",
"private": false,
"licenses": [ { "type": "MIT" }],
"author": "Leon Chen",
Please sign in to comment.
Something went wrong with that request. Please try again.