author | Lars Hjemli <hjemli@gmail.com> | 2009-12-12 11:09:47 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2009-12-12 11:09:47 (UTC) |
commit | 547a64fbd65de293c290f4e18bbeae958d54aaa7 (patch) (unidiff) | |
tree | e35d8ae4e9408cd552e539c5af08d4bd6fdd1e8f | |
parent | 0642435fed6793a0d038e1e5097a91293ee89a05 (diff) | |
parent | c86e206a9773f97dc6de6bbf45712bb304de3653 (diff) | |
download | cgit-547a64fbd65de293c290f4e18bbeae958d54aaa7.zip cgit-547a64fbd65de293c290f4e18bbeae958d54aaa7.tar.gz cgit-547a64fbd65de293c290f4e18bbeae958d54aaa7.tar.bz2 |
Merge branch 'stable'
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | ui-blob.c | 2 | ||||
-rw-r--r-- | ui-plain.c | 2 | ||||
-rw-r--r-- | ui-tree.c | 2 |
4 files changed, 4 insertions, 4 deletions
@@ -1,13 +1,13 @@ | |||
1 | CGIT_VERSION = v0.8.3 | 1 | CGIT_VERSION = v0.8.3.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_DATA_PATH = $(CGIT_SCRIPT_PATH) | 4 | CGIT_DATA_PATH = $(CGIT_SCRIPT_PATH) |
5 | CGIT_CONFIG = /etc/cgitrc | 5 | CGIT_CONFIG = /etc/cgitrc |
6 | CACHE_ROOT = /var/cache/cgit | 6 | CACHE_ROOT = /var/cache/cgit |
7 | SHA1_HEADER = <openssl/sha.h> | 7 | SHA1_HEADER = <openssl/sha.h> |
8 | GIT_VER = 1.6.4.3 | 8 | GIT_VER = 1.6.4.3 |
9 | GIT_URL = http://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.bz2 | 9 | GIT_URL = http://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.bz2 |
10 | INSTALL = install | 10 | INSTALL = install |
11 | 11 | ||
12 | # Define NO_STRCASESTR if you don't have strcasestr. | 12 | # Define NO_STRCASESTR if you don't have strcasestr. |
13 | # | 13 | # |
@@ -41,25 +41,25 @@ void cgit_print_blob(const char *hex, char *path, const char *head) | |||
41 | if (get_sha1(head,sha1)) { | 41 | if (get_sha1(head,sha1)) { |
42 | cgit_print_error(fmt("Bad ref: %s", head)); | 42 | cgit_print_error(fmt("Bad ref: %s", head)); |
43 | return; | 43 | return; |
44 | } | 44 | } |
45 | } | 45 | } |
46 | 46 | ||
47 | type = sha1_object_info(sha1, &size); | 47 | type = sha1_object_info(sha1, &size); |
48 | 48 | ||
49 | if((!hex) && type == OBJ_COMMIT && path) { | 49 | if((!hex) && type == OBJ_COMMIT && path) { |
50 | commit = lookup_commit_reference(sha1); | 50 | commit = lookup_commit_reference(sha1); |
51 | match_path = path; | 51 | match_path = path; |
52 | matched_sha1 = sha1; | 52 | matched_sha1 = sha1; |
53 | read_tree_recursive(commit->tree, NULL, 0, 0, paths, walk_tree, NULL); | 53 | read_tree_recursive(commit->tree, "", 0, 0, paths, walk_tree, NULL); |
54 | type = sha1_object_info(sha1,&size); | 54 | type = sha1_object_info(sha1,&size); |
55 | } | 55 | } |
56 | 56 | ||
57 | if (type == OBJ_BAD) { | 57 | if (type == OBJ_BAD) { |
58 | cgit_print_error(fmt("Bad object name: %s", hex)); | 58 | cgit_print_error(fmt("Bad object name: %s", hex)); |
59 | return; | 59 | return; |
60 | } | 60 | } |
61 | 61 | ||
62 | buf = read_sha1_file(sha1, &type, &size); | 62 | buf = read_sha1_file(sha1, &type, &size); |
63 | if (!buf) { | 63 | if (!buf) { |
64 | cgit_print_error(fmt("Error reading object %s", hex)); | 64 | cgit_print_error(fmt("Error reading object %s", hex)); |
65 | return; | 65 | return; |
@@ -79,16 +79,16 @@ void cgit_print_plain(struct cgit_context *ctx) | |||
79 | 79 | ||
80 | curr_rev = xstrdup(rev); | 80 | curr_rev = xstrdup(rev); |
81 | if (get_sha1(rev, sha1)) { | 81 | if (get_sha1(rev, sha1)) { |
82 | html_status(404, "Not found", 0); | 82 | html_status(404, "Not found", 0); |
83 | return; | 83 | return; |
84 | } | 84 | } |
85 | commit = lookup_commit_reference(sha1); | 85 | commit = lookup_commit_reference(sha1); |
86 | if (!commit || parse_commit(commit)) { | 86 | if (!commit || parse_commit(commit)) { |
87 | html_status(404, "Not found", 0); | 87 | html_status(404, "Not found", 0); |
88 | return; | 88 | return; |
89 | } | 89 | } |
90 | match_path = ctx->qry.path; | 90 | match_path = ctx->qry.path; |
91 | read_tree_recursive(commit->tree, NULL, 0, 0, paths, walk_tree, NULL); | 91 | read_tree_recursive(commit->tree, "", 0, 0, paths, walk_tree, NULL); |
92 | if (!match) | 92 | if (!match) |
93 | html_status(404, "Not found", 0); | 93 | html_status(404, "Not found", 0); |
94 | } | 94 | } |
@@ -277,15 +277,15 @@ void cgit_print_tree(const char *rev, char *path) | |||
277 | } | 277 | } |
278 | 278 | ||
279 | html("path: <a href='"); | 279 | html("path: <a href='"); |
280 | html_attr(cgit_pageurl(ctx.qry.repo, "tree", fmt("h=%s", rev))); | 280 | html_attr(cgit_pageurl(ctx.qry.repo, "tree", fmt("h=%s", rev))); |
281 | html("'>root</a>"); | 281 | html("'>root</a>"); |
282 | 282 | ||
283 | if (path == NULL) { | 283 | if (path == NULL) { |
284 | ls_tree(commit->tree->object.sha1, NULL); | 284 | ls_tree(commit->tree->object.sha1, NULL); |
285 | return; | 285 | return; |
286 | } | 286 | } |
287 | 287 | ||
288 | match_path = path; | 288 | match_path = path; |
289 | read_tree_recursive(commit->tree, NULL, 0, 0, paths, walk_tree, NULL); | 289 | read_tree_recursive(commit->tree, "", 0, 0, paths, walk_tree, NULL); |
290 | ls_tail(); | 290 | ls_tail(); |
291 | } | 291 | } |