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:
@@ -1480,7 +1480,6 @@ public class ReceiveCommits {
|
|||||||
for (RevCommit c : magicBranch.baseCommit) {
|
for (RevCommit c : magicBranch.baseCommit) {
|
||||||
walk.markUninteresting(c);
|
walk.markUninteresting(c);
|
||||||
}
|
}
|
||||||
assert magicBranch.ctl != null;
|
|
||||||
Ref targetRef = allRefs.get(magicBranch.ctl.getRefName());
|
Ref targetRef = allRefs.get(magicBranch.ctl.getRefName());
|
||||||
if (targetRef != null) {
|
if (targetRef != null) {
|
||||||
walk.markUninteresting(walk.parseCommit(targetRef.getObjectId()));
|
walk.markUninteresting(walk.parseCommit(targetRef.getObjectId()));
|
||||||
|
|||||||
Reference in New Issue
Block a user