* [RFC] pull --set-upstream implementation
@ 2019-02-27 14:05 BOMPARD CORENTIN p1603631
0 siblings, 0 replies; only message in thread
From: BOMPARD CORENTIN p1603631 @ 2019-02-27 14:05 UTC (permalink / raw)
To: git@vger.kernel.org
Cc: BERBEZIER NATHAN p1601409, CHABANNE PABLO p1602176, MOY MATTHIEU
We are currently working on adding "--set-upstream <remote> <branch>" to pull, that will work like "push --set-upstream <remote> <branch>"
The main usage should be "git pull --set-upstream <remote> <branch>"
However:
* <branch> could be a refspec like "refs/heads/*"
* If there is an error such as invalid URL or unreachable host we don't want to edit the config
It makes more sense to us to implement the "--set-upstream" logic in git fetch which would let us test the remote and manage when called with a refspec. As a side effect: it will add the "--set-upstream" argument to fetch.
Essentialy we see 3 options:
1- add the "--set-upstream" argument directly in builtin/pull.c it will make it harder to parse the refspec and test the remote
2- add the "--set-upstream" as a visible argument of fetch as fetch --set-upstream could be useful
3- add the "--set-upstream" as a hidden argument of fetch
Option 2 seems the best choice to us, any suggestion?
Thanks in advance.
Corentin BOMPARD, Nathan BERBEZIER, Pablo CHABANNE.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-02-27 14:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-27 14:05 [RFC] pull --set-upstream implementation BOMPARD CORENTIN p1603631
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).