author | Junio C Hamano <junkio@cox.net> | |
Sun, 21 Aug 2005 11:38:33 +0000 (04:38 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 21 Aug 2005 11:38:33 +0000 (04:38 -0700) |
diff.c | patch | blob | history | |
init-db.c | patch | blob | history | |
sha1_name.c | patch | blob | history | |
t/t0000-basic.sh | patch | blob | history | |
templates/hooks--pre-commit | patch | blob | history |
index bb2a43b5b0725a5ef1896fcdd62e4d3e3ceccc04..137d0d0c0c3eaaaa1c3c874c6e5f719e00a0d396 100644 (file)
--- a/diff.c
+++ b/diff.c
diff_flush_name(p, line_termination);
break;
}
- }
- for (i = 0; i < q->nr; i++)
diff_free_filepair(q->queue[i]);
+ }
free(q->queue);
q->queue = NULL;
q->nr = q->alloc = 0;
diff --git a/init-db.c b/init-db.c
index 1fb3f7fa79136f296ece9e04f6fdbf34bb40eeeb..50b16b34b0e3a3fe4de29252eb9261055913e262 100644 (file)
--- a/init-db.c
+++ b/init-db.c
}
strcpy(path+len, "/pack");
safe_create_dir(path);
+ strcpy(path+len, "/info");
+ safe_create_dir(path);
return 0;
}
diff --git a/sha1_name.c b/sha1_name.c
index fdd321448ce144aac87c6e5e50cbe08054951feb..6744bbbef574fd053a5c76f96fc14e4d4a6c3263 100644 (file)
--- a/sha1_name.c
+++ b/sha1_name.c
"refs",
"refs/tags",
"refs/heads",
- "refs/snap",
NULL
};
const char **p;
diff --git a/t/t0000-basic.sh b/t/t0000-basic.sh
index 547488bd25a060ba0701f838ffb936a8e9fd91b3..142b7bf388bbaa1f93dcf9069086e3d6ef02887b 100755 (executable)
--- a/t/t0000-basic.sh
+++ b/t/t0000-basic.sh
'.git/objects should be empty after git-init-db in an empty repo.' \
'cmp -s /dev/null should-be-empty'
-# also it should have 257 subdirectories. 258 is counting "objects"
+# also it should have 258 subdirectories; 256 fan-out, pack, and info.
+# 259 is counting "objects" itself
find .git/objects -type d -print >full-of-directories
test_expect_success \
- '.git/objects should have 257 subdirectories.' \
- 'test $(wc -l < full-of-directories) = 258'
+ '.git/objects should have 258 subdirectories.' \
+ 'test $(wc -l < full-of-directories) = 259'
################################################################
# Basics of the basics
index dad99bcf1029e17045c45a97ffe7b18657c1e237..075eb3c1f4ca272f095c92dd1b99f3286924bff7 100644 (file)
sub bad_line {
my ($why, $line) = @_;
if (!$found_bad) {
- print "*\n";
- print "* You have some suspicious patch lines:\n";
- print "*\n";
+ print STDERR "*\n";
+ print STDERR "* You have some suspicious patch lines:\n";
+ print STDERR "*\n";
$found_bad = 1;
}
if ($reported_filename ne $filename) {
- print "* In $filename\n";
+ print STDERR "* In $filename\n";
$reported_filename = $filename;
}
- print "* $why (line $lineno)\n";
- print "$filename:$lineno:$line\n";
+ print STDERR "* $why (line $lineno)\n";
+ print STDERR "$filename:$lineno:$line\n";
}
open $fh, "-|", qw(git-diff-cache -p -M --cached HEAD);
while (<$fh>) {