summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2010-03-04 22:26:44 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2010-03-04 22:26:44 -0800
commit712d352577012d5035da69bbf49ea0f0df8bb7da (patch)
treee38d970678cdca4ea8d6488c5200c62be5ccb268
parentMerge branch 'ld/maint-diff-quiet-w' into maint (diff)
parentcherry_pick_list: quit early if one side is empty (diff)
downloadtgif-712d352577012d5035da69bbf49ea0f0df8bb7da.tar.xz
Merge branch 'tr/maint-cherry-pick-list' into maint
* tr/maint-cherry-pick-list: cherry_pick_list: quit early if one side is empty
-rw-r--r--revision.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/revision.c b/revision.c
index 3ba6d991f6..a8f0aa4c67 100644
--- a/revision.c
+++ b/revision.c
@@ -547,6 +547,9 @@ static void cherry_pick_list(struct commit_list *list, struct rev_info *revs)
right_count++;
}
+ if (!left_count || !right_count)
+ return;
+
left_first = left_count < right_count;
init_patch_ids(&ids);
if (revs->diffopt.nr_paths) {