summaryrefslogtreecommitdiffabout
path: root/ui-commit.c
authorLars Hjemli <hjemli@gmail.com>2006-12-16 00:11:55 (UTC)
committer Lars Hjemli <hjemli@gmail.com>2006-12-16 00:11:55 (UTC)
commit6c14f5e457e17da9205588c273d7cb9f92a23b9f (patch) (unidiff)
tree5786904549cdefe16e003ddd874c62567f27abfa /ui-commit.c
parentf516218d0d0a6ddbd04e8ade722cc67eee4cf001 (diff)
downloadcgit-6c14f5e457e17da9205588c273d7cb9f92a23b9f.zip
cgit-6c14f5e457e17da9205588c273d7cb9f92a23b9f.tar.gz
cgit-6c14f5e457e17da9205588c273d7cb9f92a23b9f.tar.bz2
Add head comment to ui-commit.c
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'ui-commit.c') (more/less context) (ignore whitespace changes)
-rw-r--r--ui-commit.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/ui-commit.c b/ui-commit.c
index 2d38f0b..2d36015 100644
--- a/ui-commit.c
+++ b/ui-commit.c
@@ -1,24 +1,32 @@
1/* ui-commit.c: generate commit view
2 *
3 * Copyright (C) 2006 Lars Hjemli
4 *
5 * Licensed under GNU General Public License v2
6 * (see COPYING for full license text)
7 */
8
1#include "cgit.h" 9#include "cgit.h"
2 10
3void cgit_print_commit(const char *hex) 11void cgit_print_commit(const char *hex)
4{ 12{
5 struct commit *commit; 13 struct commit *commit;
6 struct commitinfo *info; 14 struct commitinfo *info;
7 struct commit_list *p; 15 struct commit_list *p;
8 unsigned long size; 16 unsigned long size;
9 char type[20]; 17 char type[20];
10 char *buf; 18 char *buf;
11 19
12 unsigned char sha1[20]; 20 unsigned char sha1[20];
13 21
14 if (get_sha1(hex, sha1)) { 22 if (get_sha1(hex, sha1)) {
15 cgit_print_error(fmt("Bad object id: %s", hex)); 23 cgit_print_error(fmt("Bad object id: %s", hex));
16 return; 24 return;
17 } 25 }
18 26
19 buf = read_sha1_file(sha1, type, &size); 27 buf = read_sha1_file(sha1, type, &size);
20 if (!buf) { 28 if (!buf) {
21 cgit_print_error(fmt("Bad object reference: %s", hex)); 29 cgit_print_error(fmt("Bad object reference: %s", hex));
22 return; 30 return;
23 } 31 }
24 32