author | Lars Hjemli <hjemli@gmail.com> | 2008-11-06 18:18:27 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2008-11-06 18:18:27 (UTC) |
commit | b8a7eb12d459c48943e31762b24b169af8c427a1 (patch) (unidiff) | |
tree | bb5bfcf6e5f71a478e7586bd1d128aa94bfd7dbe | |
parent | 140012d7a8e51df5a9f9c556696778b86ade4fc9 (diff) | |
parent | e4d2f2b042100182ff5b214fd6848b71d70fad7d (diff) | |
download | cgit-b8a7eb12d459c48943e31762b24b169af8c427a1.zip cgit-b8a7eb12d459c48943e31762b24b169af8c427a1.tar.gz cgit-b8a7eb12d459c48943e31762b24b169af8c427a1.tar.bz2 |
Merge branch 'stable'
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | cache.c | 4 | ||||
m--------- | git | 0 | ||||
-rwxr-xr-x | tests/setup.sh | 6 | ||||
-rw-r--r-- | ui-plain.c | 2 |
5 files changed, 8 insertions, 6 deletions
@@ -1,13 +1,13 @@ | |||
1 | CGIT_VERSION = v0.8.1 | 1 | CGIT_VERSION = v0.8.1 |
2 | CGIT_SCRIPT_NAME = cgit.cgi | 2 | CGIT_SCRIPT_NAME = cgit.cgi |
3 | CGIT_SCRIPT_PATH = /var/www/htdocs/cgit | 3 | CGIT_SCRIPT_PATH = /var/www/htdocs/cgit |
4 | CGIT_CONFIG = /etc/cgitrc | 4 | CGIT_CONFIG = /etc/cgitrc |
5 | CACHE_ROOT = /var/cache/cgit | 5 | CACHE_ROOT = /var/cache/cgit |
6 | SHA1_HEADER = <openssl/sha.h> | 6 | SHA1_HEADER = <openssl/sha.h> |
7 | GIT_VER = 1.6.0.2 | 7 | GIT_VER = 1.6.0.3 |
8 | GIT_URL = http://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.bz2 | 8 | GIT_URL = http://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.bz2 |
9 | 9 | ||
10 | # | 10 | # |
11 | # Let the user override the above settings. | 11 | # Let the user override the above settings. |
12 | # | 12 | # |
13 | -include cgit.conf | 13 | -include cgit.conf |
@@ -413,17 +413,17 @@ int cache_ls(const char *path) | |||
413 | strcpy(name, ent->d_name); | 413 | strcpy(name, ent->d_name); |
414 | if ((err = open_slot(&slot)) != 0) { | 414 | if ((err = open_slot(&slot)) != 0) { |
415 | cache_log("[cgit] unable to open path %s: %s (%d)\n", | 415 | cache_log("[cgit] unable to open path %s: %s (%d)\n", |
416 | fullname, strerror(err), err); | 416 | fullname, strerror(err), err); |
417 | continue; | 417 | continue; |
418 | } | 418 | } |
419 | printf("%s %s %10zd %s\n", | 419 | printf("%s %s %10"PRIuMAX" %s\n", |
420 | name, | 420 | name, |
421 | sprintftime("%Y-%m-%d %H:%M:%S", | 421 | sprintftime("%Y-%m-%d %H:%M:%S", |
422 | slot.cache_st.st_mtime), | 422 | slot.cache_st.st_mtime), |
423 | slot.cache_st.st_size, | 423 | (uintmax_t)slot.cache_st.st_size, |
424 | slot.buf); | 424 | slot.buf); |
425 | close_slot(&slot); | 425 | close_slot(&slot); |
426 | } | 426 | } |
427 | closedir(dir); | 427 | closedir(dir); |
428 | return 0; | 428 | return 0; |
429 | } | 429 | } |
diff --git a/git b/git | |||
Subproject 97a7a82f199f165f85fe39a3c318b18c621e633 | Subproject 031e6c898f61db1ae0c0be641eac6532c1000d5 | ||
diff --git a/tests/setup.sh b/tests/setup.sh index 1457dd5..95acb54 100755 --- a/tests/setup.sh +++ b/tests/setup.sh | |||
@@ -22,17 +22,19 @@ mkrepo() { | |||
22 | dir=$PWD | 22 | dir=$PWD |
23 | test -d $name && return | 23 | test -d $name && return |
24 | printf "Creating testrepo %s\n" $name | 24 | printf "Creating testrepo %s\n" $name |
25 | mkdir -p $name | 25 | mkdir -p $name |
26 | cd $name | 26 | cd $name |
27 | git init | 27 | git init |
28 | for ((n=1; n<=count; n++)) | 28 | n=1 |
29 | while test $n -le $count | ||
29 | do | 30 | do |
30 | echo $n >file-$n | 31 | echo $n >file-$n |
31 | git add file-$n | 32 | git add file-$n |
32 | git commit -m "commit $n" | 33 | git commit -m "commit $n" |
34 | n=$(expr $n + 1) | ||
33 | done | 35 | done |
34 | if test "$3" = "testplus" | 36 | if test "$3" = "testplus" |
35 | then | 37 | then |
36 | echo "hello" >a+b | 38 | echo "hello" >a+b |
37 | git add a+b | 39 | git add a+b |
38 | git commit -m "add a+b" | 40 | git commit -m "add a+b" |
@@ -98,13 +100,13 @@ tests_done() | |||
98 | } | 100 | } |
99 | 101 | ||
100 | run_test() | 102 | run_test() |
101 | { | 103 | { |
102 | desc=$1 | 104 | desc=$1 |
103 | script=$2 | 105 | script=$2 |
104 | ((test_count++)) | 106 | test_count=$(expr $test_count + 1) |
105 | printf "\ntest %d: name='%s'\n" $test_count "$desc" >>test-output.log | 107 | printf "\ntest %d: name='%s'\n" $test_count "$desc" >>test-output.log |
106 | printf "test %d: eval='%s'\n" $test_count "$2" >>test-output.log | 108 | printf "test %d: eval='%s'\n" $test_count "$2" >>test-output.log |
107 | eval "$2" >>test-output.log 2>>test-output.log | 109 | eval "$2" >>test-output.log 2>>test-output.log |
108 | res=$? | 110 | res=$? |
109 | printf "test %d: exitcode=%d\n" $test_count $res >>test-output.log | 111 | printf "test %d: exitcode=%d\n" $test_count $res >>test-output.log |
110 | if test $res = 0 | 112 | if test $res = 0 |
@@ -15,13 +15,13 @@ char *match_path; | |||
15 | int match; | 15 | int match; |
16 | 16 | ||
17 | static void print_object(const unsigned char *sha1, const char *path) | 17 | static void print_object(const unsigned char *sha1, const char *path) |
18 | { | 18 | { |
19 | enum object_type type; | 19 | enum object_type type; |
20 | char *buf; | 20 | char *buf; |
21 | size_t size; | 21 | unsigned long size; |
22 | 22 | ||
23 | type = sha1_object_info(sha1, &size); | 23 | type = sha1_object_info(sha1, &size); |
24 | if (type == OBJ_BAD) { | 24 | if (type == OBJ_BAD) { |
25 | html_status(404, "Not found", 0); | 25 | html_status(404, "Not found", 0); |
26 | return; | 26 | return; |
27 | } | 27 | } |