From a62d6d84c67cebd71e8d88171a2ebe0bf3aca8a0 Mon Sep 17 00:00:00 2001 From: Vincent Zanotti Date: Sat, 10 Nov 2007 19:55:27 +0100 Subject: [PATCH 1/3] gitweb: correct month in date display for atom feeds Signed-off-by: Vincent Zanotti Signed-off-by: Junio C Hamano --- gitweb/gitweb.perl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 3064298f2..9deefce0a 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -1713,7 +1713,7 @@ sub parse_date { $date{'mday-time'} = sprintf "%d %s %02d:%02d", $mday, $months[$mon], $hour ,$min; $date{'iso-8601'} = sprintf "%04d-%02d-%02dT%02d:%02d:%02dZ", - 1900+$year, $mon, $mday, $hour ,$min, $sec; + 1900+$year, 1+$mon, $mday, $hour ,$min, $sec; $tz =~ m/^([+\-][0-9][0-9])([0-9][0-9])$/; my $local = $epoch + ((int $1 + ($2/60)) * 3600); From ff350ccf49a800c4c90f817d346fb1bcb96e02e7 Mon Sep 17 00:00:00 2001 From: Nicolas Pitre Date: Sat, 10 Nov 2007 15:00:33 -0500 Subject: [PATCH 2/3] git-hash-object should honor config variables ... such as core.compression. Signed-off-by: Nicolas Pitre Signed-off-by: Junio C Hamano --- hash-object.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hash-object.c b/hash-object.c index 18f5017f5..0a58f3f12 100644 --- a/hash-object.c +++ b/hash-object.c @@ -42,6 +42,8 @@ int main(int argc, char **argv) int prefix_length = -1; int no_more_flags = 0; + git_config(git_default_config); + for (i = 1 ; i < argc; i++) { if (!no_more_flags && argv[i][0] == '-') { if (!strcmp(argv[i], "-t")) { From a91ef6e75b897a255cc17b70014a39e68dd54c7a Mon Sep 17 00:00:00 2001 From: Nicolas Pitre Date: Sat, 10 Nov 2007 23:29:10 -0500 Subject: [PATCH 3/3] fix index-pack with packs >4GB containing deltas on 32-bit machines This probably hasn't been properly tested before. Here's a script to create a 8GB repo with the necessary characteristics (copy the test-genrandom executable from the Git build tree to /tmp first): ----- #!/bin/bash git init git config core.compression 0 # create big objects with no deltas for i in $(seq -w 1 2 63) do echo $i /tmp/test-genrandom $i 268435456 > file_$i git add file_$i rm file_$i echo "file_$i -delta" >> .gitattributes done # create "deltifiable" objects in between big objects for i in $(seq -w 2 2 64) do echo "$i $i $i" >> grow cp grow file_$i git add file_$i rm file_$i done rm grow # create a pack with them git commit -q -m "commit of big objects interlaced with small deltas" git repack -a -d ----- Then clone this repo over the Git protocol. Signed-off-by: Nicolas Pitre Signed-off-by: Junio C Hamano --- index-pack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index-pack.c b/index-pack.c index db58e0504..c232e3fc7 100644 --- a/index-pack.c +++ b/index-pack.c @@ -254,7 +254,7 @@ static void *unpack_raw_entry(struct object_entry *obj, union delta_base *delta_ static void *get_data_from_pack(struct object_entry *obj) { - unsigned long from = obj[0].idx.offset + obj[0].hdr_size; + off_t from = obj[0].idx.offset + obj[0].hdr_size; unsigned long len = obj[1].idx.offset - from; unsigned long rdy = 0; unsigned char *src, *data;