diff options
| author | Junio C Hamano <junkio@cox.net> | 2005-08-21 04:38:33 -0700 |
|---|---|---|
| committer | Junio C Hamano <junkio@cox.net> | 2005-08-21 04:38:33 -0700 |
| commit | e65be0b7aaee03fe4b700a65a828127147cc624f (patch) | |
| tree | 6400e8ab483e694223e23f7ad1a0382e4a464c20 | |
| parent | Merge with master to pick up commit hook works. (diff) | |
| parent | [PATCH] sha1_name: do not accept .git/refs/snap/. (diff) | |
| download | git-e65be0b7aaee03fe4b700a65a828127147cc624f.tar.gz git-e65be0b7aaee03fe4b700a65a828127147cc624f.zip | |
Merge refs/heads/master from .
| -rw-r--r-- | diff.c | 3 | ||||
| -rw-r--r-- | init-db.c | 2 | ||||
| -rw-r--r-- | sha1_name.c | 1 | ||||
| -rwxr-xr-x | t/t0000-basic.sh | 7 | ||||
| -rw-r--r-- | templates/hooks--pre-commit | 12 |
5 files changed, 13 insertions, 12 deletions
@@ -1010,9 +1010,8 @@ void diff_flush(int diff_output_style, int line_termination) 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; @@ -249,5 +249,7 @@ int main(int argc, char **argv) } 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 fdd321448c..6744bbbef5 100644 --- a/sha1_name.c +++ b/sha1_name.c @@ -143,7 +143,6 @@ static int get_sha1_basic(const char *str, int len, unsigned char *sha1) "refs", "refs/tags", "refs/heads", - "refs/snap", NULL }; const char **p; diff --git a/t/t0000-basic.sh b/t/t0000-basic.sh index 547488bd25..142b7bf388 100755 --- a/t/t0000-basic.sh +++ b/t/t0000-basic.sh @@ -28,11 +28,12 @@ test_expect_success \ '.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 diff --git a/templates/hooks--pre-commit b/templates/hooks--pre-commit index dad99bcf10..075eb3c1f4 100644 --- a/templates/hooks--pre-commit +++ b/templates/hooks--pre-commit @@ -19,17 +19,17 @@ perl -e ' 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>) { |
