author | Lars Hjemli <larsh@slackbox.hjemli.net> | 2009-09-13 19:56:45 (UTC) |
---|---|---|
committer | Lars Hjemli <larsh@slackbox.hjemli.net> | 2009-09-13 19:56:45 (UTC) |
commit | 45c49d6cf4b819385dfee620a81e3cb095ed5cd1 (patch) (unidiff) | |
tree | 8b9d8543bd3d9584bd81e4b03c6841afc29e9088 | |
parent | 670f99097939a08510c2c909cd38f8083800861a (diff) | |
download | cgit-45c49d6cf4b819385dfee620a81e3cb095ed5cd1.zip cgit-45c49d6cf4b819385dfee620a81e3cb095ed5cd1.tar.gz cgit-45c49d6cf4b819385dfee620a81e3cb095ed5cd1.tar.bz2 |
Use GIT-1.6.4.3
Signed-off-by: Lars Hjemli <larsh@slackbox.hjemli.net>
-rw-r--r-- | Makefile | 2 | ||||
m--------- | git | 0 | ||||
-rw-r--r-- | ui-commit.c | 2 | ||||
-rw-r--r-- | ui-log.c | 2 |
4 files changed, 3 insertions, 3 deletions
@@ -1,40 +1,40 @@ | |||
1 | CGIT_VERSION = v0.8.2.1 | 1 | CGIT_VERSION = v0.8.2.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.3.4 | 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 | # |
14 | # Define NEEDS_LIBICONV if linking with libc is not enough (eg. Darwin). | 14 | # Define NEEDS_LIBICONV if linking with libc is not enough (eg. Darwin). |
15 | # | 15 | # |
16 | 16 | ||
17 | #-include config.mak | 17 | #-include config.mak |
18 | 18 | ||
19 | # | 19 | # |
20 | # Platform specific tweaks | 20 | # Platform specific tweaks |
21 | # | 21 | # |
22 | 22 | ||
23 | uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') | 23 | uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') |
24 | uname_O := $(shell sh -c 'uname -o 2>/dev/null || echo not') | 24 | uname_O := $(shell sh -c 'uname -o 2>/dev/null || echo not') |
25 | uname_R := $(shell sh -c 'uname -r 2>/dev/null || echo not') | 25 | uname_R := $(shell sh -c 'uname -r 2>/dev/null || echo not') |
26 | 26 | ||
27 | ifeq ($(uname_O),Cygwin) | 27 | ifeq ($(uname_O),Cygwin) |
28 | NO_STRCASESTR = YesPlease | 28 | NO_STRCASESTR = YesPlease |
29 | NEEDS_LIBICONV = YesPlease | 29 | NEEDS_LIBICONV = YesPlease |
30 | endif | 30 | endif |
31 | 31 | ||
32 | # | 32 | # |
33 | # Let the user override the above settings. | 33 | # Let the user override the above settings. |
34 | # | 34 | # |
35 | -include cgit.conf | 35 | -include cgit.conf |
36 | 36 | ||
37 | # | 37 | # |
38 | # Define a way to invoke make in subdirs quietly, shamelessly ripped | 38 | # Define a way to invoke make in subdirs quietly, shamelessly ripped |
39 | # from git.git | 39 | # from git.git |
40 | # | 40 | # |
diff --git a/git b/git | |||
Subproject e276f018f2c1f0fc962fbe44a36708d1cdebada | Subproject 7fb6bcff2dece2ff9fbc5ebfe526d9b2a7e764c | ||
diff --git a/ui-commit.c b/ui-commit.c index d6b73ee..f5b0ae5 100644 --- a/ui-commit.c +++ b/ui-commit.c | |||
@@ -6,65 +6,65 @@ | |||
6 | * (see COPYING for full license text) | 6 | * (see COPYING for full license text) |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include "cgit.h" | 9 | #include "cgit.h" |
10 | #include "html.h" | 10 | #include "html.h" |
11 | #include "ui-shared.h" | 11 | #include "ui-shared.h" |
12 | #include "ui-diff.h" | 12 | #include "ui-diff.h" |
13 | #include "ui-log.h" | 13 | #include "ui-log.h" |
14 | 14 | ||
15 | void cgit_print_commit(char *hex) | 15 | void cgit_print_commit(char *hex) |
16 | { | 16 | { |
17 | struct commit *commit, *parent; | 17 | struct commit *commit, *parent; |
18 | struct commitinfo *info; | 18 | struct commitinfo *info; |
19 | struct commit_list *p; | 19 | struct commit_list *p; |
20 | unsigned char sha1[20]; | 20 | unsigned char sha1[20]; |
21 | char *tmp; | 21 | char *tmp; |
22 | int parents = 0; | 22 | int parents = 0; |
23 | 23 | ||
24 | if (!hex) | 24 | if (!hex) |
25 | hex = ctx.qry.head; | 25 | hex = ctx.qry.head; |
26 | 26 | ||
27 | if (get_sha1(hex, sha1)) { | 27 | if (get_sha1(hex, sha1)) { |
28 | cgit_print_error(fmt("Bad object id: %s", hex)); | 28 | cgit_print_error(fmt("Bad object id: %s", hex)); |
29 | return; | 29 | return; |
30 | } | 30 | } |
31 | commit = lookup_commit_reference(sha1); | 31 | commit = lookup_commit_reference(sha1); |
32 | if (!commit) { | 32 | if (!commit) { |
33 | cgit_print_error(fmt("Bad commit reference: %s", hex)); | 33 | cgit_print_error(fmt("Bad commit reference: %s", hex)); |
34 | return; | 34 | return; |
35 | } | 35 | } |
36 | info = cgit_parse_commit(commit); | 36 | info = cgit_parse_commit(commit); |
37 | 37 | ||
38 | load_ref_decorations(); | 38 | load_ref_decorations(DECORATE_FULL_REFS); |
39 | 39 | ||
40 | html("<table summary='commit info' class='commit-info'>\n"); | 40 | html("<table summary='commit info' class='commit-info'>\n"); |
41 | html("<tr><th>author</th><td>"); | 41 | html("<tr><th>author</th><td>"); |
42 | html_txt(info->author); | 42 | html_txt(info->author); |
43 | if (!ctx.cfg.noplainemail) { | 43 | if (!ctx.cfg.noplainemail) { |
44 | html(" "); | 44 | html(" "); |
45 | html_txt(info->author_email); | 45 | html_txt(info->author_email); |
46 | } | 46 | } |
47 | html("</td><td class='right'>"); | 47 | html("</td><td class='right'>"); |
48 | cgit_print_date(info->author_date, FMT_LONGDATE, ctx.cfg.local_time); | 48 | cgit_print_date(info->author_date, FMT_LONGDATE, ctx.cfg.local_time); |
49 | html("</td></tr>\n"); | 49 | html("</td></tr>\n"); |
50 | html("<tr><th>committer</th><td>"); | 50 | html("<tr><th>committer</th><td>"); |
51 | html_txt(info->committer); | 51 | html_txt(info->committer); |
52 | if (!ctx.cfg.noplainemail) { | 52 | if (!ctx.cfg.noplainemail) { |
53 | html(" "); | 53 | html(" "); |
54 | html_txt(info->committer_email); | 54 | html_txt(info->committer_email); |
55 | } | 55 | } |
56 | html("</td><td class='right'>"); | 56 | html("</td><td class='right'>"); |
57 | cgit_print_date(info->committer_date, FMT_LONGDATE, ctx.cfg.local_time); | 57 | cgit_print_date(info->committer_date, FMT_LONGDATE, ctx.cfg.local_time); |
58 | html("</td></tr>\n"); | 58 | html("</td></tr>\n"); |
59 | html("<tr><th>commit</th><td colspan='2' class='sha1'>"); | 59 | html("<tr><th>commit</th><td colspan='2' class='sha1'>"); |
60 | tmp = sha1_to_hex(commit->object.sha1); | 60 | tmp = sha1_to_hex(commit->object.sha1); |
61 | cgit_commit_link(tmp, NULL, NULL, ctx.qry.head, tmp); | 61 | cgit_commit_link(tmp, NULL, NULL, ctx.qry.head, tmp); |
62 | html(" ("); | 62 | html(" ("); |
63 | cgit_patch_link("patch", NULL, NULL, NULL, tmp); | 63 | cgit_patch_link("patch", NULL, NULL, NULL, tmp); |
64 | html(")</td></tr>\n"); | 64 | html(")</td></tr>\n"); |
65 | html("<tr><th>tree</th><td colspan='2' class='sha1'>"); | 65 | html("<tr><th>tree</th><td colspan='2' class='sha1'>"); |
66 | tmp = xstrdup(hex); | 66 | tmp = xstrdup(hex); |
67 | cgit_tree_link(sha1_to_hex(commit->tree->object.sha1), NULL, NULL, | 67 | cgit_tree_link(sha1_to_hex(commit->tree->object.sha1), NULL, NULL, |
68 | ctx.qry.head, tmp, NULL); | 68 | ctx.qry.head, tmp, NULL); |
69 | html("</td></tr>\n"); | 69 | html("</td></tr>\n"); |
70 | for (p = commit->parents; p ; p = p->next) { | 70 | for (p = commit->parents; p ; p = p->next) { |
@@ -132,65 +132,65 @@ static const char *disambiguate_ref(const char *ref) | |||
132 | return ref; | 132 | return ref; |
133 | } | 133 | } |
134 | 134 | ||
135 | void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern, | 135 | void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern, |
136 | char *path, int pager) | 136 | char *path, int pager) |
137 | { | 137 | { |
138 | struct rev_info rev; | 138 | struct rev_info rev; |
139 | struct commit *commit; | 139 | struct commit *commit; |
140 | const char *argv[] = {NULL, NULL, NULL, NULL, NULL}; | 140 | const char *argv[] = {NULL, NULL, NULL, NULL, NULL}; |
141 | int argc = 2; | 141 | int argc = 2; |
142 | int i, columns = 3; | 142 | int i, columns = 3; |
143 | 143 | ||
144 | if (!tip) | 144 | if (!tip) |
145 | tip = ctx.qry.head; | 145 | tip = ctx.qry.head; |
146 | 146 | ||
147 | argv[1] = disambiguate_ref(tip); | 147 | argv[1] = disambiguate_ref(tip); |
148 | 148 | ||
149 | if (grep && pattern && (!strcmp(grep, "grep") || | 149 | if (grep && pattern && (!strcmp(grep, "grep") || |
150 | !strcmp(grep, "author") || | 150 | !strcmp(grep, "author") || |
151 | !strcmp(grep, "committer"))) | 151 | !strcmp(grep, "committer"))) |
152 | argv[argc++] = fmt("--%s=%s", grep, pattern); | 152 | argv[argc++] = fmt("--%s=%s", grep, pattern); |
153 | 153 | ||
154 | if (path) { | 154 | if (path) { |
155 | argv[argc++] = "--"; | 155 | argv[argc++] = "--"; |
156 | argv[argc++] = path; | 156 | argv[argc++] = path; |
157 | } | 157 | } |
158 | init_revisions(&rev, NULL); | 158 | init_revisions(&rev, NULL); |
159 | rev.abbrev = DEFAULT_ABBREV; | 159 | rev.abbrev = DEFAULT_ABBREV; |
160 | rev.commit_format = CMIT_FMT_DEFAULT; | 160 | rev.commit_format = CMIT_FMT_DEFAULT; |
161 | rev.verbose_header = 1; | 161 | rev.verbose_header = 1; |
162 | rev.show_root_diff = 0; | 162 | rev.show_root_diff = 0; |
163 | setup_revisions(argc, argv, &rev, NULL); | 163 | setup_revisions(argc, argv, &rev, NULL); |
164 | load_ref_decorations(); | 164 | load_ref_decorations(DECORATE_FULL_REFS); |
165 | rev.show_decorations = 1; | 165 | rev.show_decorations = 1; |
166 | rev.grep_filter.regflags |= REG_ICASE; | 166 | rev.grep_filter.regflags |= REG_ICASE; |
167 | compile_grep_patterns(&rev.grep_filter); | 167 | compile_grep_patterns(&rev.grep_filter); |
168 | prepare_revision_walk(&rev); | 168 | prepare_revision_walk(&rev); |
169 | 169 | ||
170 | if (pager) | 170 | if (pager) |
171 | html("<table class='list nowrap'>"); | 171 | html("<table class='list nowrap'>"); |
172 | 172 | ||
173 | html("<tr class='nohover'><th class='left'>Age</th>" | 173 | html("<tr class='nohover'><th class='left'>Age</th>" |
174 | "<th class='left'>Commit message"); | 174 | "<th class='left'>Commit message"); |
175 | if (pager) { | 175 | if (pager) { |
176 | html(" ("); | 176 | html(" ("); |
177 | cgit_log_link(ctx.qry.showmsg ? "Collapse" : "Expand", NULL, | 177 | cgit_log_link(ctx.qry.showmsg ? "Collapse" : "Expand", NULL, |
178 | NULL, ctx.qry.head, ctx.qry.sha1, | 178 | NULL, ctx.qry.head, ctx.qry.sha1, |
179 | ctx.qry.path, ctx.qry.ofs, ctx.qry.grep, | 179 | ctx.qry.path, ctx.qry.ofs, ctx.qry.grep, |
180 | ctx.qry.search, ctx.qry.showmsg ? 0 : 1); | 180 | ctx.qry.search, ctx.qry.showmsg ? 0 : 1); |
181 | html(")"); | 181 | html(")"); |
182 | } | 182 | } |
183 | html("</th><th class='left'>Author</th>"); | 183 | html("</th><th class='left'>Author</th>"); |
184 | if (ctx.repo->enable_log_filecount) { | 184 | if (ctx.repo->enable_log_filecount) { |
185 | html("<th class='left'>Files</th>"); | 185 | html("<th class='left'>Files</th>"); |
186 | columns++; | 186 | columns++; |
187 | if (ctx.repo->enable_log_linecount) { | 187 | if (ctx.repo->enable_log_linecount) { |
188 | html("<th class='left'>Lines</th>"); | 188 | html("<th class='left'>Lines</th>"); |
189 | columns++; | 189 | columns++; |
190 | } | 190 | } |
191 | } | 191 | } |
192 | html("</tr>\n"); | 192 | html("</tr>\n"); |
193 | 193 | ||
194 | if (ofs<0) | 194 | if (ofs<0) |
195 | ofs = 0; | 195 | ofs = 0; |
196 | 196 | ||