aboutsummaryrefslogtreecommitdiff
path: root/ui-diff.c
diff refs
from:
to:
flip
diff options
context:
space:
mode:
Diffstat (limited to 'ui-diff.c')
-rw-r--r--ui-diff.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/ui-diff.c b/ui-diff.c
index 5ee3830..13c1e32 100644
--- a/ui-diff.c
+++ b/ui-diff.c
@@ -409,6 +409,14 @@ void cgit_print_diff_ctrls(void)
html("<td class='ctrl'>");
cgit_print_ref_select("id", new_ref);
html("</td></tr>");
+
+ html("<tr><td/><td class='ctrl'>");
+ cgit_diff_link("flip", "swap from and to", "button",
+ ctx.qry.head,
+ is_null_oid(old_rev_oid) ? NULL :
+ oid_to_hex(old_rev_oid),
+ new_ref, ctx.qry.path);
+ html("</td></tr>");
}
html("</table>");
html("</div>");