core/commands/add: Change add() to only accept a single reader
The change to an array of readers comes from e096060b (refactor(core/commands2/add) split loop, 2014-11-06), where it's used to setup readers for each path in the argument list. However, since 6faeee83 (cmds2/add: temp fix for -r. horrible hack, 2014-11-11) the argument looping moved outside of add() and into Run(), so we can drop the multiple-reader support from add(). Adding a file can create multiple nodes (e.g. the splitter can chunk the file into several blocks), but: 1. we were only appending a single node per reader to our returned list, and 2. we are only using the final node in that returned list, so this commit also adjusts add() to return a single node reference instead on an array of nodes.
Showing
Please register or sign in to comment