Browse Source

Merge "InMemoryRepository: Abort BatchRefUpdate if a command previously failed"

stable-4.3
Shawn Pearce 9 years ago committed by Gerrit Code Review @ Eclipse.org
parent
commit
5001038f52
  1. 5
      org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/InMemoryRepository.java

5
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/InMemoryRepository.java

@ -310,6 +310,11 @@ public class InMemoryRepository extends DfsRepository {
Map<ObjectId, ObjectId> peeled = new HashMap<>();
try (RevWalk rw = new RevWalk(getRepository())) {
for (ReceiveCommand c : cmds) {
if (c.getResult() != ReceiveCommand.Result.NOT_ATTEMPTED) {
reject(cmds);
return;
}
if (!ObjectId.zeroId().equals(c.getNewId())) {
try {
RevObject o = rw.parseAny(c.getNewId());

Loading…
Cancel
Save