Merge refs/heads/master from .

This commit is contained in:
Junio C Hamano
2005-08-21 04:38:33 -07:00
5 changed files with 13 additions and 12 deletions

3
diff.c
View File

@ -1010,9 +1010,8 @@ void diff_flush(int diff_output_style, int line_termination)
diff_flush_name(p, line_termination); diff_flush_name(p, line_termination);
break; break;
} }
}
for (i = 0; i < q->nr; i++)
diff_free_filepair(q->queue[i]); diff_free_filepair(q->queue[i]);
}
free(q->queue); free(q->queue);
q->queue = NULL; q->queue = NULL;
q->nr = q->alloc = 0; q->nr = q->alloc = 0;

View File

@ -249,5 +249,7 @@ int main(int argc, char **argv)
} }
strcpy(path+len, "/pack"); strcpy(path+len, "/pack");
safe_create_dir(path); safe_create_dir(path);
strcpy(path+len, "/info");
safe_create_dir(path);
return 0; return 0;
} }

View File

@ -143,7 +143,6 @@ static int get_sha1_basic(const char *str, int len, unsigned char *sha1)
"refs", "refs",
"refs/tags", "refs/tags",
"refs/heads", "refs/heads",
"refs/snap",
NULL NULL
}; };
const char **p; const char **p;

View File

@ -28,11 +28,12 @@ test_expect_success \
'.git/objects should be empty after git-init-db in an empty repo.' \ '.git/objects should be empty after git-init-db in an empty repo.' \
'cmp -s /dev/null should-be-empty' '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 find .git/objects -type d -print >full-of-directories
test_expect_success \ test_expect_success \
'.git/objects should have 257 subdirectories.' \ '.git/objects should have 258 subdirectories.' \
'test $(wc -l < full-of-directories) = 258' 'test $(wc -l < full-of-directories) = 259'
################################################################ ################################################################
# Basics of the basics # Basics of the basics

View File

@ -19,17 +19,17 @@ perl -e '
sub bad_line { sub bad_line {
my ($why, $line) = @_; my ($why, $line) = @_;
if (!$found_bad) { if (!$found_bad) {
print "*\n"; print STDERR "*\n";
print "* You have some suspicious patch lines:\n"; print STDERR "* You have some suspicious patch lines:\n";
print "*\n"; print STDERR "*\n";
$found_bad = 1; $found_bad = 1;
} }
if ($reported_filename ne $filename) { if ($reported_filename ne $filename) {
print "* In $filename\n"; print STDERR "* In $filename\n";
$reported_filename = $filename; $reported_filename = $filename;
} }
print "* $why (line $lineno)\n"; print STDERR "* $why (line $lineno)\n";
print "$filename:$lineno:$line\n"; print STDERR "$filename:$lineno:$line\n";
} }
open $fh, "-|", qw(git-diff-cache -p -M --cached HEAD); open $fh, "-|", qw(git-diff-cache -p -M --cached HEAD);
while (<$fh>) { while (<$fh>) {