Remove pointless assertion for magicBranch validation

The code here requires magicBranch.ctl to be defined if
magicBranch.baseCommit was filled in by the caller. Gerrit
is never run with -ea, so the assert is useless.

Remove the check, as the code will just helpfully NPE
when magicBranch.ctl.getRefName() is invoked.

Change-Id: I3cc30a089464ac613cbf69c2c486acf53467b009
This commit is contained in:
Shawn Pearce
2014-12-11 09:14:47 -08:00
parent 729e45f68a
commit 4d48626b92

View File

@@ -1480,7 +1480,6 @@ public class ReceiveCommits {
for (RevCommit c : magicBranch.baseCommit) {
walk.markUninteresting(c);
}
assert magicBranch.ctl != null;
Ref targetRef = allRefs.get(magicBranch.ctl.getRefName());
if (targetRef != null) {
walk.markUninteresting(walk.parseCommit(targetRef.getObjectId()));