-
Notifications
You must be signed in to change notification settings - Fork 300
Description
Follow-on from #685.
If I
create_from_github()on someone else's repository for which I already have a GitHub fork (e.g.r-lib/usethis), the copy that gets cloned to my computer is my master branch, not the upstream master branch. I will probably want to start my work from the upstream master, rather than my likely-stale master. I know that this is easily fixed withpr_pull_upstream(), but I wonder if this might be a useful default behavior forcreate_from_github().
It would seem to be a matter of adding pr_pull_upstream() to the end of:
Lines 198 to 202 in 2749025
| if (fork) { | |
| r <- git2r::repository(proj_get()) | |
| ui_done("Adding {ui_value('upstream')} remote: {ui_value(upstream_url)}") | |
| git2r::remote_add(r, "upstream", upstream_url) | |
| } |
I'm assuming that the feedback (ui_done()) from pr_pull_upstream() takes care of having to add something here ourselves.
I'll start a PR for this, subject to your guidance.