MCPcopy Create free account
hub / github.com/ReZeroS/git / addFile

Method addFile

src/main/java/club/qqtim/command/Add.java:61–67  ·  view source on GitHub ↗
(JsonObject asJsonObject, String file)

Source from the content-addressed store, hash-verified

59 }
60
61 private void addFile(JsonObject asJsonObject, String file) {
62 HashObject hashObject = new HashObject();
63 hashObject.setFile(new File(file));
64 hashObject.setType(ConstantVal.BLOB);
65 final String objectId = hashObject.call();
66 asJsonObject.addProperty(file, objectId);
67 }
68
69
70 private void addDirectory(JsonObject asJsonObject, String file) {

Callers 2

addFilesMethod · 0.95
addDirectoryMethod · 0.95

Calls 1

callMethod · 0.95

Tested by

no test coverage detected