Ignore new-change-for-all-not-in-target for root commit

Without this check, we would throw a NPE and never let review
requests to be created without an explicit HEAD creation.

Change-Id: If28689c83c98663e571552146507795c48c8264d
This commit is contained in:
Deniz Türkoglu 2014-09-12 12:00:19 +02:00
parent d9b8b39088
commit c391fc8489

@ -1304,9 +1304,11 @@ public class ReceiveCommits {
return;
}
// If tip is a merge commit or %base was specified,
// ignore newChangeForAllNotInTarget
if (tip.getParentCount() > 1 || magicBranch.base != null) {
// If tip is a merge commit, or the root commit or
// if %base was specified, ignore newChangeForAllNotInTarget
if (tip.getParentCount() > 1
|| magicBranch.base != null
|| tip.getParentCount() == 0) {
newChangeForAllNotInTarget = false;
}