]> source.dussan.org Git - jgit.git/commit
Make UploadPack observe exceptions reading refs 01/70701/3
authorMike Edgar <adgar@google.com>
Wed, 13 Apr 2016 02:23:08 +0000 (22:23 -0400)
committerMike Edgar <adgar@google.com>
Fri, 15 Apr 2016 00:41:53 +0000 (20:41 -0400)
commit4812fdab61c1ac61863247574be03425ba3bc674
tree2b1ab5157935407b0a6ed3c4b4317a39b80cbe06
parent32a5993227b5f43cb32becdf14d3efb6e88fa847
Make UploadPack observe exceptions reading refs

Now if refs are unreadable when serving an upload pack the handler
will fail due to the actual underlying failure. Previously all wants
would be rejected as invalid because Repository.getAllRefs() returned
an empty map.

Testing this required a new subclass of InMemoryRepository so that
an IOException could be injected at the correct time.

Signed-off-by: Michael Edgar <adgar@google.com>
Change-Id: Iac708b1db9d0ccce08c4ef5ace599ea0b57afdc0
org.eclipse.jgit.http.test/META-INF/MANIFEST.MF
org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/RefsUnreadableInMemoryRepository.java [new file with mode: 0644]
org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java
org.eclipse.jgit/META-INF/MANIFEST.MF
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/InMemoryRepository.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java