Permalink
Browse files

Fixes for npm and git 1.7

  • Loading branch information...
Christian Amor Kvalheim
Christian Amor Kvalheim committed Aug 31, 2010
1 parent 202088d commit ef36acb4ffa96e803519e9d517356a7076ded392
Showing with 11 additions and 9 deletions.
  1. +2 −0 install.sh
  2. +1 −1 lib/git/pack_storage.js
  3. +2 −2 lib/git/repository.js
  4. +1 −1 package.json
  5. +1 −1 test/test_commit.js
  6. +2 −2 test/test_git.js
  7. +2 −2 test/test_git_index.js
View
@@ -1,4 +1,6 @@
cd ./external-libs/node-compress
+rm -rf ./build
+rm compress.node
node-waf configure
node-waf build
cd ..
View
@@ -263,7 +263,7 @@ var find_object_in_index = function(pack, idx, sha1) {
for(var i = 0; i < midsha1.length; i++) {
compare_sha1 = compare_sha1 + String.fromCharCode(midsha1[i]);
}
-
+
// Do a locale Compare
var cmp = compare_sha1.localeCompare(sha1);
if(cmp < 0) {
View
@@ -173,8 +173,7 @@ var get_raw_object_by_sha1 = function(repo, sha1o) {
// try packs again maybe the object got packed in the meantime
initpacks(repo);
// Try packs
- var packs = repo.packs;
-
+ var packs = repo.packs;
for(var i = 0; i < packs.length; i++) {
var o = packs[i].find(sha1);
if(o != null) return o;
@@ -466,6 +465,7 @@ var walk_log = function(repo, sha, options, total_size) {
if(sha) {
// Get the raw object
o = get_raw_object_by_sha1(repo, sha);
+
// Create a git object from the raw object
if(o.type == "tag") {
commit_sha = repo.get_object_by_sha1(sha).object;
View
@@ -1,6 +1,6 @@
{ "name" : "git"
, "description" : "A node.js library for git"
-, "version" : "0.1"
+, "version" : "0.1.0"
, "scripts" : { "install" : "./install.sh" }
, "author" : "Christian Amor Kvalheim <christkv@gmail.com>"
, "contributors" : []
View
@@ -272,7 +272,7 @@ suite.addTests({
assert.ok(patch.indexOf('test/test_reality.rb | 30 +++++++++++++++---------------') != -1);
assert.ok(patch.indexOf('@@ -1,17 +1,17 @@') != -1);
assert.ok(patch.indexOf('+# recurse(t)') != -1);
- assert.ok(patch.indexOf('1.6.') != -1);
+ assert.ok(patch.indexOf('1.7.') != -1);
finished();
});
});
View
@@ -24,7 +24,7 @@ suite.addTests({
var git = new Git("./test/grit");
git.git('bad', function(err, result) {
assert.ok(err);
- assert.ok(err.indexOf("git: 'bad' is not a git-command") != -1);
+ assert.ok(err.indexOf("git: 'bad' is not a git command") != -1);
finished();
})
},
@@ -33,7 +33,7 @@ suite.addTests({
var git = new Git("./test/grit");
git.git('bad', {timeout:false}, function(err, result) {
assert.ok(err);
- assert.ok(err.indexOf("git: 'bad' is not a git-command") != -1);
+ assert.ok(err.indexOf("git: 'bad' is not a git command") != -1);
finished();
})
},
View
@@ -167,12 +167,12 @@ suite.addTests({
"Should correctly modify file":function(assert, finished) {
var base_repo = "./test/dot_git_iv2"
-
+
create_tmp_directory(base_repo, function(err, target_path) {
new Repo(target_path + "/dot_git_iv2", {is_bare:true}, function(err, repo) {
var repository = repo.git.repository;
var user = Actor.from_string("Tom Werner <tom@example.com>");
-
+
// Fetch the commits
repo.commits(function(err, commits) {
var sha = commits[0].tree.id;

0 comments on commit ef36acb

Please sign in to comment.