|
31 | 31 | import java.util.Objects;
|
32 | 32 | import java.util.Set;
|
33 | 33 |
|
34 |
| -import org.eclipse.jgit.annotations.NonNull; |
35 | 34 | import org.eclipse.jgit.annotations.Nullable;
|
36 | 35 | import org.eclipse.jgit.api.errors.GitAPIException;
|
37 | 36 | import org.eclipse.jgit.api.errors.JGitInternalException;
|
@@ -542,29 +541,6 @@ public void notifyIndexChanged(boolean internal) {
|
542 | 541 | fireEvent(new IndexChangedEvent(internal));
|
543 | 542 | }
|
544 | 543 |
|
545 |
| - @Override |
546 |
| - public ReflogReader getReflogReader(String refName) throws IOException { |
547 |
| - if (refs instanceof FileReftableDatabase) { |
548 |
| - // Cannot use findRef: reftable stores log data for deleted or renamed |
549 |
| - // branches. |
550 |
| - return ((FileReftableDatabase)refs).getReflogReader(refName); |
551 |
| - } |
552 |
| - |
553 |
| - // TODO: use exactRef here, which offers more predictable and therefore preferable |
554 |
| - // behavior. |
555 |
| - Ref ref = findRef(refName); |
556 |
| - if (ref == null) { |
557 |
| - return null; |
558 |
| - } |
559 |
| - return new ReflogReaderImpl(this, ref.getName()); |
560 |
| - } |
561 |
| - |
562 |
| - @Override |
563 |
| - public @NonNull ReflogReader getReflogReader(@NonNull Ref ref) |
564 |
| - throws IOException { |
565 |
| - return new ReflogReaderImpl(this, ref.getName()); |
566 |
| - } |
567 |
| - |
568 | 544 | @Override
|
569 | 545 | public AttributesNodeProvider createAttributesNodeProvider() {
|
570 | 546 | return new AttributesNodeProviderImpl(this);
|
@@ -697,8 +673,8 @@ void convertToPackedRefs(boolean writeLogs, boolean backup) throws IOException {
|
697 | 673 | }
|
698 | 674 |
|
699 | 675 | if (writeLogs) {
|
700 |
| - List<ReflogEntry> logs = oldDb.getReflogReader(r.getName()) |
701 |
| - .getReverseEntries(); |
| 676 | + ReflogReader reflogReader = oldDb.getReflogReader(r); |
| 677 | + List<ReflogEntry> logs = reflogReader.getReverseEntries(); |
702 | 678 | Collections.reverse(logs);
|
703 | 679 | for (ReflogEntry e : logs) {
|
704 | 680 | logWriter.log(r.getName(), e);
|
|
0 commit comments