Diff options
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
Tidy comments on the history pages
-rw-r--r--source/ui-commit.c11
-rw-r--r--source/ui-log.c6
-rw-r--r--source/ui-patch.c3
-rw-r--r--source/ui-stats.c11
4 files changed, 14 insertions, 17 deletions
diff --git a/source/ui-commit.c b/source/ui-commit.c
index ce00cf0..c6071ff 100644
--- a/source/ui-commit.c
+++ b/source/ui-commit.c
@@ -1,10 +1,9 @@
/*
- * The commit page, which shows one commit on its own and is where the log and
- * the ref listings link. It renders the idents, the object ids, the message,
- * the trailer table when the repository asks for one and any note, then hands
- * off to ui-diff.c for the diff against the first parent. Free text and
- * addresses are written through the repository's commit, trailer and email
- * filters, so a site can rewrite any of them on the way out.
+ * The commit page renders the idents, the object ids, the message, the trailer
+ * table when the repository asks for one and any note, then hands off to
+ * ui-diff.c for the diff against the first parent. Free text and addresses are
+ * written through the repository's commit, trailer and email filters, so a
+ * site can rewrite any of them on the way out.
*/
#define USE_THE_REPOSITORY_VARIABLE
diff --git a/source/ui-log.c b/source/ui-log.c
index 2af6967..1864d6f 100644
--- a/source/ui-log.c
+++ b/source/ui-log.c
@@ -212,8 +212,10 @@ static void print_graph_padding(struct rev_info *revs, struct strbuf *graph, int
html("</td>\n");
}
-// Ends a row in a table wider than the log with an empty cell for each column
-// the log has no use for.
+/*
+ * Ends a row in a table wider than the log with an empty cell for each column
+ * the log has no use for.
+ */
static void print_filler(int columns)
{
while (columns-- > 0)
diff --git a/source/ui-patch.c b/source/ui-patch.c
index 166a475..0163e25 100644
--- a/source/ui-patch.c
+++ b/source/ui-patch.c
@@ -124,8 +124,7 @@ void cgit_print_patch(const char *new_rev, const char *old_rev, const char *pref
cgit_print_http_headers();
// git format-patch signs with its bare version number, so the v that
- // cgit's tags carry is left off to read the same way. Without
- // enable-version-info the signature names cgit alone.
+ // cgit's tags carry is left off to read the same way.
if (!skip_prefix(cgit_version, "v", &version))
version = cgit_version;
diff --git a/source/ui-stats.c b/source/ui-stats.c
index 24a6e53..06ec2bc 100644
--- a/source/ui-stats.c
+++ b/source/ui-stats.c
@@ -1,9 +1,7 @@
/*
- * The statistics page, which counts commits per author across a window of
- * recent weeks, months, quarters or years. The window sizes live in one table
- * here, which cgit.c also resolves the max-stats setting against so a
- * repository can refuse the coarser windows. The page reads no diff and no
- * blob contents, so the whole thing costs about one rev-list.
+ * The statistics page counts each author's commits in the most recent periods
+ * of the size asked for. It reads no diff and no blob contents, so the whole
+ * thing costs about one rev-list.
*/
#define USE_THE_REPOSITORY_VARIABLE
@@ -179,13 +177,12 @@ static void add_commit(struct string_list *authors, struct commitinfo *info,
stats = author->util;
when = info->committer_date;
// A crafted commit can carry a date outside the range gmtime_r can
- // represent, which would leave date uninitialized and later index the
+ // represent, which would leave date uninitialised and later index the
// month table out of bounds.
if (!gmtime_r(&when, &date))
return;
period->trunc(&date);
label = xstrdup(period->pretty(&date));
- // The pointer field holds the count itself.
bucket = string_list_insert(&stats->periods, label);
if (bucket->util)
free(label);