Skip to content

Add second param that indicates whether repo was cloned or pulled #23

@davej

Description

@davej

Usage would look like this:

const cloneOrPull = require('git-clone-or-pull')

cloneOrPull('git@github.com:feross/standard.git', '/path/to/destination', (err, action) => {
  if (err) throw err
  console.log(action) // -> 'clone'

  cloneOrPull('git@github.com: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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions