remove TODO from code, see TODO file
1 files changed, 4 insertions(+), 10 deletions(-) | |||
---|---|---|---|
M | urmoms.c | +4 | -10 |
1@@ -73,7 +73,6 @@ commitinfo_getbyoid(const git_oid *id)
2 if (git_commit_lookup(&(ci->commit), repo, id))
3 goto err;
4
5- /* TODO: show tags when commit has it */
6 git_oid_tostr(ci->oid, sizeof(ci->oid), git_commit_id(ci->commit));
7 git_oid_tostr(ci->parentoid, sizeof(ci->parentoid), git_commit_parent_id(ci->commit, 0));
8
9@@ -82,7 +81,7 @@ commitinfo_getbyoid(const git_oid *id)
10 ci->msg = git_commit_message(ci->commit);
11
12 if ((error = git_commit_tree(&(ci->commit_tree), ci->commit)))
13- goto err; /* TODO: handle error */
14+ goto err;
15 if (!(error = git_commit_parent(&(ci->parent), ci->commit, 0))) {
16 if ((error = git_commit_tree(&(ci->parent_tree), ci->parent)))
17 goto err;
18@@ -102,8 +101,6 @@ commitinfo_getbyoid(const git_oid *id)
19 ci->delcount = git_diff_stats_deletions(ci->stats);
20 ci->filecount = git_diff_stats_files_changed(ci->stats);
21
22- /* TODO: show tag when commit has it */
23-
24 return ci;
25
26 err:
27@@ -168,7 +165,7 @@ mkdirp(const char *path)
28 {
29 char tmp[PATH_MAX], *p;
30
31- strlcpy(tmp, path, sizeof(tmp)); /* TODO: bring in libutil? */
32+ strlcpy(tmp, path, sizeof(tmp));
33 for (p = tmp + (tmp[0] == '/'); *p; p++) {
34 if (*p != '/')
35 continue;
36@@ -283,7 +280,6 @@ writeblobhtml(FILE *fp, const git_blob *blob)
37 void
38 printcommit(FILE *fp, struct commitinfo *ci)
39 {
40- /* TODO: show tag when commit has it */
41 fprintf(fp, "<b>commit</b> <a href=\"%scommit/%s.html\">%s</a>\n",
42 relpath, ci->oid, ci->oid);
43
44@@ -363,7 +359,7 @@ printshowfile(struct commitinfo *ci)
45 for (i = 0; i < ndeltas; i++) {
46 if (git_patch_from_diff(&patch, ci->diff, i)) {
47 git_patch_free(patch);
48- break; /* TODO: handle error */
49+ break;
50 }
51
52 delta = git_patch_get_delta(patch);
53@@ -381,7 +377,7 @@ printshowfile(struct commitinfo *ci)
54 nhunks = git_patch_num_hunks(patch);
55 for (j = 0; j < nhunks; j++) {
56 if (git_patch_get_hunk(&hunk, &nhunklines, patch, j))
57- break; /* TODO: handle error ? */
58+ break;
59
60 fprintf(fp, "<span class=\"h\">%s</span>\n", hunk->header);
61
62@@ -426,7 +422,6 @@ writelog(FILE *fp)
63 git_revwalk_sorting(w, GIT_SORT_TIME);
64 git_revwalk_simplify_first_parent(w);
65
66- /* TODO: also make "expanded" log ? (with message body) */
67 fputs("<table id=\"log\"><thead>\n<tr><td>Age</td><td>Commit message</td>"
68 "<td>Author</td><td>Files</td><td class=\"num\">+</td>"
69 "<td class=\"num\">-</td></tr>\n</thead><tbody>\n", fp);
70@@ -644,7 +639,6 @@ writefilestree(FILE *fp, git_tree *tree, const char *path)
71 filesize = git_blob_rawsize((git_blob *)obj);
72
73 fputs("<tr><td>", fp);
74- /* TODO: fancy print, like: "-rw-r--r--" */
75 fprintf(fp, "%u", git_tree_entry_filemode_raw(entry));
76 fprintf(fp, "</td><td><a href=\"%sfile/", relpath);
77 xmlencode(fp, filename, strlen(filename));