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