cleanup code a bit
1 files changed, 4 insertions(+), 31 deletions(-) | |||
---|---|---|---|
M | stagit.c | +4 | -31 |
1@@ -317,17 +317,6 @@ printcommit(FILE *fp, struct commitinfo *ci)
2 fprintf(fp, "<b>parent</b> <a href=\"%scommit/%s.html\">%s</a>\n",
3 relpath, ci->parentoid, ci->parentoid);
4
5-#if 0
6- if ((count = (int)git_commit_parentcount(commit)) > 1) {
7- fputs("<b>Merge:</b>", fp);
8- for (i = 0; i < count; i++) {
9- git_oid_tostr(buf, 8, git_commit_parent_id(commit, i));
10- fprintf(fp, " <a href=\"%scommit/%s.html\">%s</a>",
11- relpath, buf, buf);
12- }
13- fputc('\n', fp);
14- }
15-#endif
16 if (ci->author) {
17 fputs("<b>Author:</b> ", fp);
18 xmlencode(fp, ci->author->name, strlen(ci->author->name));
19@@ -531,18 +520,6 @@ printcommitatom(FILE *fp, struct commitinfo *ci)
20 fprintf(fp, "commit %s\n", ci->oid);
21 if (ci->parentoid[0])
22 fprintf(fp, "parent %s\n", ci->parentoid);
23-
24-#if 0
25- if ((count = (int)git_commit_parentcount(commit)) > 1) {
26- fputs("Merge:", fp);
27- for (i = 0; i < count; i++) {
28- git_oid_tostr(buf, 8, git_commit_parent_id(commit, i));
29- fprintf(fp, " %s", buf);
30- }
31- fputc('\n', fp);
32- }
33-#endif
34-
35 if (ci->author) {
36 fputs("Author: ", fp);
37 xmlencode(fp, ci->author->name, strlen(ci->author->name));
38@@ -821,15 +798,10 @@ writerefs(FILE *fp)
39
40 for (j = 0; j < 2; j++) {
41 for (i = 0, count = 0; i < refcount; i++) {
42- if (git_reference_is_branch(refs[i]) && j == 0)
43- ;
44- else if (git_reference_is_tag(refs[i]) && j == 1)
45- ;
46- else
47+ if (!(git_reference_is_branch(refs[i]) && j == 0) &&
48+ !(git_reference_is_tag(refs[i]) && j == 1))
49 continue;
50
51- id = NULL;
52- r = NULL;
53 switch (git_reference_type(refs[i])) {
54 case GIT_REF_SYMBOLIC:
55 if (git_reference_resolve(&dref, refs[i]))
56@@ -870,7 +842,8 @@ writerefs(FILE *fp)
57 printtimeshort(fp, &(ci->author->when));
58 fputs("</td><td>", fp);
59 if (ci->summary) {
60- fprintf(fp, "<a href=\"%scommit/%s.html\">", relpath, ci->oid);
61+ fprintf(fp, "<a href=\"%scommit/%s.html\">",
62+ relpath, ci->oid);
63 if ((len = strlen(ci->summary)) > summarylen) {
64 xmlencode(fp, ci->summary, summarylen - 1);
65 fputs("…", fp);