Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

feat: jsipfs add --only-hash (#1233) #1266

Merged
merged 4 commits into from
Mar 17, 2018
Merged

feat: jsipfs add --only-hash (#1233) #1266

merged 4 commits into from
Mar 17, 2018

Conversation

daviddias
Copy link
Member

Continuing the work from #1233

@ghost ghost assigned daviddias Mar 16, 2018
@ghost ghost added the status/in-progress In progress label Mar 16, 2018
* add --only-hash flag

* skeleton http option passing, checkpoint commit to check some broken tests.

* deep logging for debugging. Checkpoint

* found the levledown problem! line endings!

* add only-hash as a qs option for the send-files-stream. Also added some tests to help me figure that out

* update --only-hash test, increase timeout for the afterAll hook. I think it takes longer because the --only-hash test leaves an unresolved ipfs.ls command. Would love to be able to cancel it :)

* ipfs-exec/ipfs.fail should throw on a non-failing command && use random file for ipfs add --only-hash test.

* fix an ipfs config test.

* lint

* clean: move test/http-api/extra/files.js to test/http-api/files.js
@@ -182,7 +188,8 @@ module.exports = {
strategy: argv.trickle ? 'trickle' : 'balanced',
shardSplitThreshold: argv.enableShardingExperiment ? argv.shardSplitThreshold : Infinity,
'cid-version': argv['cid-version'],
'raw-leaves': argv['raw-leaves']
'raw-leaves': argv['raw-leaves'],
onlyHash: argv['only-hash']
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should be 'only-hash'

Copy link
Contributor

@JonKrone JonKrone Mar 16, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest we keep it onlyHash. cid-version and raw-leaves are the outlier here. There are many hyphenated options we convert to camelCase at the entry points of cli/http-api such as the above shardSplittingThreshold and dag --local-resolve, object --input-enc.

I can change raw-leaves and cid-version instead

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JonKrone I like that. Go for it :)

@daviddias daviddias assigned JonKrone and unassigned daviddias Mar 16, 2018
Copy link
Member Author

@daviddias daviddias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@daviddias daviddias merged commit bddc5b4 into master Mar 17, 2018
@ghost ghost removed the status/in-progress In progress label Mar 17, 2018
@daviddias daviddias deleted the only-hash branch March 17, 2018 14:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants