Usage would look like this:
const cloneOrPull = require('git-clone-or-pull')
cloneOrPull('[email protected]:feross/standard.git', '/path/to/destination', (err, action) => {
if (err) throw err
console.log(action) // -> 'clone'
cloneOrPull('[email protected]:feross/standard.git', '/path/to/destination', (err, action) => {
if (err) throw err
console.log(action) // -> 'pull'
})
})
What do you think? It would also be non-breaking which is a bonus.