MergeOp: Don't get all refs when just refs/heads/* will do

Change-Id: Icb4121f5f2f3cec2a4bfa92730672aa8b5a49b31
This commit is contained in:
Dave Borowitz
2014-10-21 11:13:58 -07:00
parent 0c187bb0cf
commit 9fc79ae86d

View File

@@ -460,13 +460,11 @@ public class MergeOp {
} }
try { try {
for (Ref r : repo.getRefDatabase().getRefs(ALL).values()) { for (Ref r : repo.getRefDatabase().getRefs(Constants.R_HEADS).values()) {
if (r.getName().startsWith(Constants.R_HEADS)) { try {
try { alreadyAccepted.add(rw.parseCommit(r.getObjectId()));
alreadyAccepted.add(rw.parseCommit(r.getObjectId())); } catch (IncorrectObjectTypeException iote) {
} catch (IncorrectObjectTypeException iote) { // Not a commit? Skip over it.
// Not a commit? Skip over it.
}
} }
} }
} catch (IOException e) { } catch (IOException e) {