File tree Expand file tree Collapse file tree 2 files changed +407
-503
lines changed
Expand file tree Collapse file tree 2 files changed +407
-503
lines changed Original file line number Diff line number Diff line change @@ -71,11 +71,15 @@ public List<MerkleNode> add(NamedStreamable file) throws IOException {
7171 }
7272
7373 public List <MerkleNode > add (NamedStreamable file , boolean wrap ) throws IOException {
74- return add (Collections . singletonList ( file ) , wrap );
74+ return add (file , wrap , false );
7575 }
7676
77- public List <MerkleNode > add (List <NamedStreamable > files , boolean wrap ) throws IOException {
78- Multipart m = new Multipart ("http://" + host + ":" + port + version + "add?w=" +wrap , "UTF-8" );
77+ public List <MerkleNode > add (NamedStreamable file , boolean wrap , boolean hashOnly ) throws IOException {
78+ return add (Collections .singletonList (file ), wrap , hashOnly );
79+ }
80+
81+ public List <MerkleNode > add (List <NamedStreamable > files , boolean wrap , boolean hashOnly ) throws IOException {
82+ Multipart m = new Multipart ("http://" + host + ":" + port + version + "add?w=" +wrap + "&n=" +hashOnly , "UTF-8" );
7983 for (NamedStreamable file : files ) {
8084 if (file .isDirectory ()) {
8185 m .addSubtree (Paths .get ("" ), file );
You can’t perform that action at this time.
0 commit comments