|
|
@ -793,14 +793,18 @@ public class TestRepository<R extends Repository> { |
|
|
|
|
|
|
|
|
|
|
|
public CommitBuilder add(String path, final RevBlob id) |
|
|
|
public CommitBuilder add(String path, final RevBlob id) |
|
|
|
throws Exception { |
|
|
|
throws Exception { |
|
|
|
DirCacheEditor e = tree.editor(); |
|
|
|
return edit(new PathEdit(path) { |
|
|
|
e.add(new PathEdit(path) { |
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void apply(DirCacheEntry ent) { |
|
|
|
public void apply(DirCacheEntry ent) { |
|
|
|
ent.setFileMode(FileMode.REGULAR_FILE); |
|
|
|
ent.setFileMode(FileMode.REGULAR_FILE); |
|
|
|
ent.setObjectId(id); |
|
|
|
ent.setObjectId(id); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public CommitBuilder edit(PathEdit edit) { |
|
|
|
|
|
|
|
DirCacheEditor e = tree.editor(); |
|
|
|
|
|
|
|
e.add(edit); |
|
|
|
e.finish(); |
|
|
|
e.finish(); |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|