소스 검색

InMemoryRepository: Abort BatchRefUpdate if a command previously failed

If any command has already been marked as failing, fail the entire batch.

Change-Id: I1692240841aa4f4cb252bdccbc6f11d9246929c1
tags/v4.2.0.201601211800-r
Shawn Pearce 8 년 전
부모
커밋
4c9eda17be
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5
    0
      org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/InMemoryRepository.java

+ 5
- 0
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…
취소
저장