-rw-r--r-- | ui-commit.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/ui-commit.c b/ui-commit.c index 1c0e7e5..2d38f0b 100644 --- a/ui-commit.c +++ b/ui-commit.c | |||
@@ -1,37 +1,26 @@ | |||
1 | #include "cgit.h" | 1 | #include "cgit.h" |
2 | 2 | ||
3 | void cgit_print_date(unsigned long secs) | ||
4 | { | ||
5 | char buf[32]; | ||
6 | struct tm *time; | ||
7 | |||
8 | time = gmtime(&secs); | ||
9 | strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", time); | ||
10 | html_txt(buf); | ||
11 | |||
12 | } | ||
13 | |||
14 | void cgit_print_commit(const char *hex) | 3 | void cgit_print_commit(const char *hex) |
15 | { | 4 | { |
16 | struct commit *commit; | 5 | struct commit *commit; |
17 | struct commitinfo *info; | 6 | struct commitinfo *info; |
18 | struct commit_list *p; | 7 | struct commit_list *p; |
19 | unsigned long size; | 8 | unsigned long size; |
20 | char type[20]; | 9 | char type[20]; |
21 | char *buf; | 10 | char *buf; |
22 | 11 | ||
23 | unsigned char sha1[20]; | 12 | unsigned char sha1[20]; |
24 | 13 | ||
25 | if (get_sha1(hex, sha1)) { | 14 | if (get_sha1(hex, sha1)) { |
26 | cgit_print_error(fmt("Bad object id: %s", hex)); | 15 | cgit_print_error(fmt("Bad object id: %s", hex)); |
27 | return; | 16 | return; |
28 | } | 17 | } |
29 | 18 | ||
30 | buf = read_sha1_file(sha1, type, &size); | 19 | buf = read_sha1_file(sha1, type, &size); |
31 | if (!buf) { | 20 | if (!buf) { |
32 | cgit_print_error(fmt("Bad object reference: %s", hex)); | 21 | cgit_print_error(fmt("Bad object reference: %s", hex)); |
33 | return; | 22 | return; |
34 | } | 23 | } |
35 | 24 | ||
36 | commit = lookup_commit(sha1); | 25 | commit = lookup_commit(sha1); |
37 | if (!commit) { | 26 | if (!commit) { |