From: BOMPARD CORENTIN p1603631 <corentin.bompard@etu.univ-lyon1.fr>
To: "git@vger.kernel.org" <git@vger.kernel.org>
Cc: BERBEZIER NATHAN p1601409 <nathan.berbezier@etu.univ-lyon1.fr>,
"CHABANNE PABLO p1602176" <pablo.chabanne@etu.univ-lyon1.fr>,
MOY MATTHIEU <matthieu.moy@univ-lyon1.fr>
Subject: [RFC] pull --set-upstream implementation
Date: Wed, 27 Feb 2019 14:05:02 +0000 [thread overview]
Message-ID: <1551276325342.31383@etu.univ-lyon1.fr> (raw)
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.
reply other threads:[~2019-02-27 14:05 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1551276325342.31383@etu.univ-lyon1.fr \
--to=corentin.bompard@etu.univ-lyon1.fr \
--cc=git@vger.kernel.org \
--cc=matthieu.moy@univ-lyon1.fr \
--cc=nathan.berbezier@etu.univ-lyon1.fr \
--cc=pablo.chabanne@etu.univ-lyon1.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).