Diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Offer no diff options on an octopus merge
The commit page draws no diff for a merge of three or more parents, so
the options above it changed nothing.
Diffstat (limited to 'source')
| -rw-r--r-- | source/ui-commit.c | 4 |
1 file changed, 3 insertions, 1 deletion
diff --git a/source/ui-commit.c b/source/ui-commit.c index 846dd5d..63f2b7e 100644 --- a/source/ui-commit.c +++ b/source/ui-commit.c @@ -270,7 +270,9 @@ void cgit_print_commit(char *hex, const char *prefix) ctx.page.title = cgit_fmtalloc("%s - %s", info->subject, ctx.page.title); cgit_print_layout_start(); - cgit_print_diff_ctrls(); + // An octopus merge draws no diff, so it has no options to offer. + if (commit_list_count(commit->parents) < OCTOPUS_PARENTS) + cgit_print_diff_ctrls(); html("<table class='commit-info'>\n"); print_ident_row("author", info->author, info->author_email, info->author_date, info->author_tz); |
