datalad / datalad

Keep code, data, containers under control with git and git-annex
http://datalad.org
Other
539 stars 111 forks source link

Code duplication #952

Closed mih closed 7 years ago

mih commented 8 years ago

Primarily FYIL I ran clonedigger on 5b1aef4503ce6223092cf696c00d9b839a65ad57

Here is the output: http://kumo.ovgu.de/~mih/5b1aef4503ce6223092cf696c00d9b839a65ad57.html

In general things are looking quite good (outside the test code).

mih commented 8 years ago

clone 74 should go. and 47. 38ff. 8 and 11 are worth a look.

bpoldrack commented 8 years ago

8 and 11 are subject to RF'ing anyway. But yes - should go. Just not as is. 47: Similar. The way we pass options has to change. But despite from that: I don't think it's worth putting every piece of code duplication in a dedicated function, if it is rarely used and calling the function is more expensive than its entire content. But: probably it should go in a more general way by providing a function to set an option for a command call while respecting already passed options.