]> source.dussan.org Git - jgit.git/commit
reftable: fix lookup by ID in merged reftables 62/151062/3
authorHan-Wen Nienhuys <hanwen@google.com>
Sun, 13 Oct 2019 17:21:06 +0000 (19:21 +0200)
committerHan-Wen Nienhuys <hanwen@google.com>
Wed, 16 Oct 2019 13:15:55 +0000 (15:15 +0200)
commit218bacdc1f96942701503aa7891707bb3eccc111
tree53aaf1a6592b245620f93afc288c8c909e1f972c
parentbca00aa5f464e1bc3aa00d4b757554b54f35ddb2
reftable: fix lookup by ID in merged reftables

On changing a ref, the old SHA1 is not updated in the object => ref
mapping. This means search by object ID may still turn up a ref from
deeper within the stack. To fix this, check all refs produced by the
merged iterator against the merged reftables.

Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Change-Id: I41e9cd395b0608eedeeaead0a9fd997238d747c9
org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/reftable/MergedReftableTest.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/MergedReftable.java