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 second param that indicates whether repo was cloned or pulled #23

Open
davej opened this issue Nov 15, 2017 · 3 comments
Open

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

davej opened this issue Nov 15, 2017 · 3 comments

Comments

@davej
Copy link
Contributor

davej commented Nov 15, 2017

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.

@strugee
Copy link
Owner

strugee commented Nov 15, 2017

I would take patches for this provided they have test suite coverage 👍

@davej
Copy link
Contributor Author

davej commented Nov 15, 2017

Cool. Added it to my todo list. Backlog is about 3 weeks but I should get around to it. 👍

@strugee
Copy link
Owner

strugee commented Nov 15, 2017

Lol, np. I've been behind on everything for several months, so no rush

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants