Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add: Fix adding multiple files #6255

Merged
merged 3 commits into from Apr 25, 2019

Conversation

@magik6k
Copy link
Member

commented Apr 25, 2019

See #6254

magik6k added 3 commits Apr 25, 2019
add: fix adding multiple files
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
add: fix wrap with multiple files
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
add: test adding multiple files
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>

@ghost ghost assigned magik6k Apr 25, 2019

@ghost ghost added the in progress label Apr 25, 2019

@magik6k magik6k requested a review from Stebalien Apr 25, 2019

@Stebalien
Copy link
Contributor

left a comment

LGTM. I'd like to reconsider how we're doing events (ideally, we'd be able to reuse the channel) but we can handle that in a followup PR.

_, dir := addit.Node().(files.Directory)
errCh := make(chan error, 1)
events := make(chan interface{}, adderOutChanSize)
opts[len(opts)-1] = options.Unixfs.Events(events)

This comment has been minimized.

Copy link
@Stebalien

Stebalien Apr 25, 2019

Contributor

Maybe we shouldn't be closing this channel?

This comment has been minimized.

Copy link
@Stebalien

Stebalien Apr 25, 2019

Contributor

Otherwise, we could drop the need for the nil option by writing:

opts := append(opts, options.Unixfs.Events(events)) // note the :=

@Stebalien Stebalien merged commit 5d9651a into master Apr 25, 2019

7 checks passed

ci/circleci: gobuild Your tests passed on CircleCI!
Details
ci/circleci: gotest Your tests passed on CircleCI!
Details
ci/circleci: sharness Your tests passed on CircleCI!
Details
codeclimate All good!
Details
codecov/patch 90.47% of diff hit (target 63.24%)
Details
codecov/project Absolute coverage decreased by -0.01% but relative coverage increased by +27.22% compared to c1bc202
Details
commit-message-check/gitcop All commit messages are valid
Details

@Stebalien Stebalien deleted the fix/add-many branch Apr 25, 2019

@ghost ghost removed the in progress label Apr 25, 2019

@momack2 momack2 added this to Done in ipfs/go-ipfs May 9, 2019

@Kubuxu Kubuxu referenced this pull request May 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
2 participants
You can’t perform that action at this time.