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

feat: add options to AddDir #285

Merged
merged 2 commits into from
Mar 7, 2023
Merged

Conversation

acashmoney
Copy link
Contributor

@acashmoney acashmoney commented Mar 2, 2023

This PR modifies the AddDir function to accept AddOpts. A test function in shell_test.go called TestAddDirWithCidV1 has been included to ensure that CidVersion(1) works as an AddOpt.

See #276 for reference issue

@welcome
Copy link

welcome bot commented Mar 2, 2023

Thank you for submitting this PR!
A maintainer will be here shortly to review it.
We are super grateful, but we are also overloaded! Help us by making sure that:

  • The context for this PR is clear, with relevant discussion, decisions
    and stakeholders linked/mentioned.

  • Your contribution itself is clear (code comments, self-review for the
    rest) and in its best form. Follow the code contribution
    guidelines

    if they apply.

Getting other community members to do a review would be great help too on complex PRs (you can ask in the chats/forums). If you are unsure about something, just leave us a comment.
Next steps:

  • A maintainer will triage and assign priority to this PR, commenting on
    any missing things and potentially assigning a reviewer for high
    priority items.

  • The PR gets reviews, discussed and approvals as needed.

  • The PR is merged by maintainers when it has been approved and comments addressed.

We currently aim to provide initial feedback/triaging within two business days. Please keep an eye on any labelling actions, as these will indicate priorities and status of your contribution.
We are very grateful for your contribution!

Copy link
Member

@hacdias hacdias left a comment

Choose a reason for hiding this comment

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

@acashmoney thanks for this. I pushed a fix for your update though: we cannot use .Exec here as add streams responses back for each file inside the directory and we only care about the last. Exec would take the first one instead. Therefore, the test you added also had the wrong CID. I added the correct one (outputted by ipfs add -r --cid-version 1 ./testdata). I'm merging once CI is passing.

@hacdias hacdias changed the title modifies adddir function to accept addopts feat: add options to AddDir Mar 7, 2023
@hacdias hacdias merged commit a976407 into ipfs:master Mar 7, 2023
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