From a918c068a695348e3f08f906b3e5845feb59d9a2 Mon Sep 17 00:00:00 2001 From: Lars Hjemli Date: Thu, 6 Nov 2008 19:13:21 +0100 Subject: Use GIT-1.6.0.3 Signed-off-by: Lars Hjemli --- Makefile | 2 +- git | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 561af76..f79688c 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ CGIT_SCRIPT_PATH = /var/www/htdocs/cgit CGIT_CONFIG = /etc/cgitrc CACHE_ROOT = /var/cache/cgit SHA1_HEADER = -GIT_VER = 1.6.0.2 +GIT_VER = 1.6.0.3 GIT_URL = http://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.bz2 # diff --git a/git b/git index 97a7a82..031e6c8 160000 --- a/git +++ b/git @@ -1 +1 @@ -Subproject commit 97a7a82f199f165f85fe39a3c318b18c621e6335 +Subproject commit 031e6c898f61db1ae0c0be641eac6532c1000d56 -- cgit v1.2.3-70-g09d2 From bdd4a56ad55720cde3b7b290b6b9fe4c57dc4f01 Mon Sep 17 00:00:00 2001 From: Ramsay Jones Date: Tue, 4 Nov 2008 19:22:08 +0000 Subject: Fix some warnings to allow -Werror The type used to declare the st_size field of a 'struct stat' can be a 32- or 64-bit sized type, which can vary from one platform to another, or even from one compilation to another. In particular, on linux, if you include the following define: #define _FILE_OFFSET_BITS 64 prior to including certain system header files, then the type used for the st_size field will be __off64_t, otherwise it will be an __off_t. Note that the above define is included at the top of git-compat-util.h. In cache.c, the "%zd" format specifier expects a "signed size_t", another type which can vary, when an __off64_t or a __off_t is provided. To supress the warning, use the PRIuMAX format specifier and cast the st_size field to uintmax_t. This should work an any platform for which git currently compiles. In ui-plain.c, the size parameter of sha1_object_info() and read_sha1_file() is defined to be "unsigned long *" not "size_t *". So, to supress the warning, simply declare size with the correct type. Signed-off-by: Ramsay Jones Signed-off-by: Lars Hjemli --- cache.c | 4 ++-- ui-plain.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cache.c b/cache.c index 57068a1..d7a8d5a 100644 --- a/cache.c +++ b/cache.c @@ -416,11 +416,11 @@ int cache_ls(const char *path) fullname, strerror(err), err); continue; } - printf("%s %s %10zd %s\n", + printf("%s %s %10"PRIuMAX" %s\n", name, sprintftime("%Y-%m-%d %H:%M:%S", slot.cache_st.st_mtime), - slot.cache_st.st_size, + (uintmax_t)slot.cache_st.st_size, slot.buf); close_slot(&slot); } diff --git a/ui-plain.c b/ui-plain.c index be559e0..5addd9e 100644 --- a/ui-plain.c +++ b/ui-plain.c @@ -18,7 +18,7 @@ static void print_object(const unsigned char *sha1, const char *path) { enum object_type type; char *buf; - size_t size; + unsigned long size; type = sha1_object_info(sha1, &size); if (type == OBJ_BAD) { -- cgit v1.2.3-70-g09d2 From e4d2f2b042100182ff5b214fd6848b71d70fad7d Mon Sep 17 00:00:00 2001 From: Ramsay Jones Date: Tue, 4 Nov 2008 19:23:41 +0000 Subject: Fix tests to work on Ubuntu (dash) The system shell (/bin/sh) on Ubuntu is dash, which aims to be a POSIX standard shell. In particular, dash does not implement any of the common extensions to the standard that, say, bash and ksh do. Replace some non-POSIX constructs in setup.sh with more portable and mundane code. Signed-off-by: Ramsay Jones Signed-off-by: Lars Hjemli --- tests/setup.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/setup.sh b/tests/setup.sh index 1457dd5..95acb54 100755 --- a/tests/setup.sh +++ b/tests/setup.sh @@ -25,11 +25,13 @@ mkrepo() { mkdir -p $name cd $name git init - for ((n=1; n<=count; n++)) + n=1 + while test $n -le $count do echo $n >file-$n git add file-$n git commit -m "commit $n" + n=$(expr $n + 1) done if test "$3" = "testplus" then @@ -101,7 +103,7 @@ run_test() { desc=$1 script=$2 - ((test_count++)) + test_count=$(expr $test_count + 1) printf "\ntest %d: name='%s'\n" $test_count "$desc" >>test-output.log printf "test %d: eval='%s'\n" $test_count "$2" >>test-output.log eval "$2" >>test-output.log 2>>test-output.log -- cgit v1.2.3-70-g09d2