summaryrefslogtreecommitdiff
path: root/revision.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-03-05 06:26:44 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-03-05 06:26:44 (GMT)
commit712d352577012d5035da69bbf49ea0f0df8bb7da (patch)
treee38d970678cdca4ea8d6488c5200c62be5ccb268 /revision.c
parent8cc3709df0e4f8e4f2aca6ae68b5b4f145787252 (diff)
parent36c079756f9f3ad0bbbe2097550c62427670146b (diff)
downloadgit-712d352577012d5035da69bbf49ea0f0df8bb7da.zip
git-712d352577012d5035da69bbf49ea0f0df8bb7da.tar.gz
git-712d352577012d5035da69bbf49ea0f0df8bb7da.tar.bz2
Merge branch 'tr/maint-cherry-pick-list' into maint
* tr/maint-cherry-pick-list: cherry_pick_list: quit early if one side is empty
Diffstat (limited to 'revision.c')
-rw-r--r--revision.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/revision.c b/revision.c
index 3ba6d99..a8f0aa4 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) {