iremove TODO from code, see TODO file - stagit-gopher - A git gopher frontend. (mirror) Err bitreich.org 70 hgit clone git://bitreich.org/stagit-gopher/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/stagit-gopher/ URL:git://bitreich.org/stagit-gopher/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/stagit-gopher/ bitreich.org 70 1Log /scm/stagit-gopher/log.gph bitreich.org 70 1Files /scm/stagit-gopher/files.gph bitreich.org 70 1Refs /scm/stagit-gopher/refs.gph bitreich.org 70 1Tags /scm/stagit-gopher/tag bitreich.org 70 1README /scm/stagit-gopher/file/README.gph bitreich.org 70 1LICENSE /scm/stagit-gopher/file/LICENSE.gph bitreich.org 70 i--- Err bitreich.org 70 1commit 9295d3f1903621475a3a8ea907941598fdc50697 /scm/stagit-gopher/commit/9295d3f1903621475a3a8ea907941598fdc50697.gph bitreich.org 70 1parent 1cc9f5fcb114c33a9c163a1b436c2a7431b94b8e /scm/stagit-gopher/commit/1cc9f5fcb114c33a9c163a1b436c2a7431b94b8e.gph bitreich.org 70 hAuthor: Hiltjo Posthuma URL:mailto:hiltjo@codemadness.org bitreich.org 70 iDate: Fri, 25 Dec 2015 17:49:54 +0100 Err bitreich.org 70 i Err bitreich.org 70 iremove TODO from code, see TODO file Err bitreich.org 70 i Err bitreich.org 70 iDiffstat: Err bitreich.org 70 i M urmoms.c | 14 ++++---------- Err bitreich.org 70 i Err bitreich.org 70 i1 file changed, 4 insertions(+), 10 deletions(-) Err bitreich.org 70 i--- Err bitreich.org 70 1diff --git a/urmoms.c b/urmoms.c /scm/stagit-gopher/file/urmoms.c.gph bitreich.org 70 i@@ -73,7 +73,6 @@ commitinfo_getbyoid(const git_oid *id) Err bitreich.org 70 i if (git_commit_lookup(&(ci->commit), repo, id)) Err bitreich.org 70 i goto err; Err bitreich.org 70 i Err bitreich.org 70 i- /* TODO: show tags when commit has it */ Err bitreich.org 70 i git_oid_tostr(ci->oid, sizeof(ci->oid), git_commit_id(ci->commit)); Err bitreich.org 70 i git_oid_tostr(ci->parentoid, sizeof(ci->parentoid), git_commit_parent_id(ci->commit, 0)); Err bitreich.org 70 i Err bitreich.org 70 i@@ -82,7 +81,7 @@ commitinfo_getbyoid(const git_oid *id) Err bitreich.org 70 i ci->msg = git_commit_message(ci->commit); Err bitreich.org 70 i Err bitreich.org 70 i if ((error = git_commit_tree(&(ci->commit_tree), ci->commit))) Err bitreich.org 70 i- goto err; /* TODO: handle error */ Err bitreich.org 70 i+ goto err; Err bitreich.org 70 i if (!(error = git_commit_parent(&(ci->parent), ci->commit, 0))) { Err bitreich.org 70 i if ((error = git_commit_tree(&(ci->parent_tree), ci->parent))) Err bitreich.org 70 i goto err; Err bitreich.org 70 i@@ -102,8 +101,6 @@ commitinfo_getbyoid(const git_oid *id) Err bitreich.org 70 i ci->delcount = git_diff_stats_deletions(ci->stats); Err bitreich.org 70 i ci->filecount = git_diff_stats_files_changed(ci->stats); Err bitreich.org 70 i Err bitreich.org 70 i- /* TODO: show tag when commit has it */ Err bitreich.org 70 i- Err bitreich.org 70 i return ci; Err bitreich.org 70 i Err bitreich.org 70 i err: Err bitreich.org 70 i@@ -168,7 +165,7 @@ mkdirp(const char *path) Err bitreich.org 70 i { Err bitreich.org 70 i char tmp[PATH_MAX], *p; Err bitreich.org 70 i Err bitreich.org 70 i- strlcpy(tmp, path, sizeof(tmp)); /* TODO: bring in libutil? */ Err bitreich.org 70 i+ strlcpy(tmp, path, sizeof(tmp)); Err bitreich.org 70 i for (p = tmp + (tmp[0] == '/'); *p; p++) { Err bitreich.org 70 i if (*p != '/') Err bitreich.org 70 i continue; Err bitreich.org 70 i@@ -283,7 +280,6 @@ writeblobhtml(FILE *fp, const git_blob *blob) Err bitreich.org 70 i void Err bitreich.org 70 i printcommit(FILE *fp, struct commitinfo *ci) Err bitreich.org 70 i { Err bitreich.org 70 i- /* TODO: show tag when commit has it */ Err bitreich.org 70 i fprintf(fp, "commit %s\n", Err bitreich.org 70 i relpath, ci->oid, ci->oid); Err bitreich.org 70 i Err bitreich.org 70 i@@ -363,7 +359,7 @@ printshowfile(struct commitinfo *ci) Err bitreich.org 70 i for (i = 0; i < ndeltas; i++) { Err bitreich.org 70 i if (git_patch_from_diff(&patch, ci->diff, i)) { Err bitreich.org 70 i git_patch_free(patch); Err bitreich.org 70 i- break; /* TODO: handle error */ Err bitreich.org 70 i+ break; Err bitreich.org 70 i } Err bitreich.org 70 i Err bitreich.org 70 i delta = git_patch_get_delta(patch); Err bitreich.org 70 i@@ -381,7 +377,7 @@ printshowfile(struct commitinfo *ci) Err bitreich.org 70 i nhunks = git_patch_num_hunks(patch); Err bitreich.org 70 i for (j = 0; j < nhunks; j++) { Err bitreich.org 70 i if (git_patch_get_hunk(&hunk, &nhunklines, patch, j)) Err bitreich.org 70 i- break; /* TODO: handle error ? */ Err bitreich.org 70 i+ break; Err bitreich.org 70 i Err bitreich.org 70 i fprintf(fp, "%s\n", hunk->header); Err bitreich.org 70 i Err bitreich.org 70 i@@ -426,7 +422,6 @@ writelog(FILE *fp) Err bitreich.org 70 i git_revwalk_sorting(w, GIT_SORT_TIME); Err bitreich.org 70 i git_revwalk_simplify_first_parent(w); Err bitreich.org 70 i Err bitreich.org 70 i- /* TODO: also make "expanded" log ? (with message body) */ Err bitreich.org 70 i fputs("\n" Err bitreich.org 70 i "" Err bitreich.org 70 i "\n\n", fp); Err bitreich.org 70 i@@ -644,7 +639,6 @@ writefilestree(FILE *fp, git_tree *tree, const char *path) Err bitreich.org 70 i filesize = git_blob_rawsize((git_blob *)obj); Err bitreich.org 70 i Err bitreich.org 70 i fputs("
AgeCommit messageAuthorFiles+-
", fp); Err bitreich.org 70 i- /* TODO: fancy print, like: "-rw-r--r--" */ Err bitreich.org 70 i fprintf(fp, "%u", git_tree_entry_filemode_raw(entry)); Err bitreich.org 70 i fprintf(fp, "