diff --git a/revision.c b/revision.c
index 0de78fbad6008b72aba946df0dfd03d5183f42bf..c92ffc2a58bcda0744da44a31bce7d7112b1e510 100644 (file)
--- a/revision.c
+++ b/revision.c
right_count++;
}
+ if (!left_count || !right_count)
+ return;
+
left_first = left_count < right_count;
init_patch_ids(&ids);
if (revs->diffopt.nr_paths) {
@@ -1176,6 +1179,7 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg
} else if (!strcmp(arg, "--oneline")) {
revs->verbose_header = 1;
get_commit_format("oneline", revs);
+ revs->pretty_given = 1;
revs->abbrev_commit = 1;
} else if (!strcmp(arg, "--graph")) {
revs->topo_order = 1;