From: Corentin BOMPARD <corentin.bompard@etu.univ-lyon1.fr>
To: <gitster@pobox.com>
Cc: <corentin.bompard@etu.univ-lyon1.fr>, <git@vger.kernel.org>,
<matthieu.moy@univ-lyon1.fr>,
<nathan.berbezier@etu.univ-lyon1.fr>,
<pablo.chabanne@etu.univ-lyon1.fr>
Subject: Re: [PATCH] [WIP/RFC] add git pull and git fetch --set-upstream
Date: Fri, 19 Apr 2019 18:00:46 +0200 [thread overview]
Message-ID: <20190419160046.5283-1-corentin.bompard@etu.univ-lyon1.fr> (raw)
In-Reply-To: <xmqq7ebshz7v.fsf@gitster-ct.c.googlers.com>
>Corentin BOMPARD <corentin.bompard@etu.univ-lyon1.fr> writes:
>
>> Add the --set-upstream option to git pull/fetch
>> which lets the user set the upstream configuration
>> for the current branch.
>
> I think it is a good idea to mention what you exactly mean by "the
> upstream configuration" here.
>
> Do you mean the "branch.<current-branch-name>.merge" configuration
> variable?
The upstream configuration means the branch.<current-branch-name>.merge
and branch.<current-branch-name>.remote
>> + /*
>> + * We're setting the upstream configuration for the current branch. The
>> + * relevent upstream is the fetched branch that is meant to be merged with
>> + * the current one, i.e. the one fetched to FETCH_HEAD.
>> + *
>> + * When there are several such branches, consider the request ambiguous and
>> + * err on the safe side by doing nothing and just emit a waring.
>> + */
>> + for (rm = ref_map; rm; rm = rm->next) {
>> + fprintf(stderr, "\n -%s", rm->name);
>> + if (rm->peer_ref) {
>> + fprintf(stderr, " -> %s", rm->peer_ref->name);
>> + } else {
>> + if (source_ref) {
>> + fprintf(stderr, " -> FETCH_HEAD\n");
>> + warning(_("Multiple branch detected, incompatible with set-upstream"));
>
> Shouldn't this be diagnosed as an error and stop the "fetch" or
> "pull", though?
We can actually replace the warning with a die, but we think it's too harsh on the user,
and if the warning is showing the upstream stays the same.
We fixed the spotted bugs/mistakes.
The fixed patch will follow.
next prev parent reply other threads:[~2019-04-19 18:17 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <d21d42228425408298da9e99b5877ac9@BPMBX2013-01.univ-lyon1.fr>
2019-04-04 15:43 ` [PATCH] [WIP/RFC] add git pull and git fetch --set-upstream Matthieu Moy
2019-04-09 12:52 ` Corentin BOMPARD
2019-04-17 16:01 ` Corentin BOMPARD
2019-04-18 1:35 ` Junio C Hamano
2019-04-19 16:00 ` Corentin BOMPARD [this message]
2019-04-19 18:42 ` Corentin BOMPARD
[not found] ` <f601baa2c2a04ddea4ba32ab25d0dd21@BPMBX2013-01.univ-lyon1.fr>
2019-04-22 10:38 ` Matthieu Moy
2019-08-14 13:46 ` [PATCH] pull, fetch: add --set-upstream option Matthieu Moy
2019-08-14 17:14 ` Pratyush Yadav
2019-08-19 9:08 ` Matthieu Moy
2019-08-19 9:11 ` [PATCH v2] " Matthieu Moy
2019-08-14 17:38 ` [PATCH] " Junio C Hamano
2019-08-19 9:07 ` Matthieu Moy
2019-08-19 20:04 ` Junio C Hamano
2019-08-20 8:09 ` Matthieu Moy
[not found] ` <36559daca9d84f7a91933add734020cd@BPMBX2013-01.univ-lyon1.fr>
2019-04-18 9:51 ` [PATCH] [WIP/RFC] add git pull and git fetch --set-upstream Matthieu Moy
2019-04-19 4:46 ` Junio C Hamano
[not found] ` <04f23ebf83bd4aff90ee9ca88cec984e@BPMBX2013-01.univ-lyon1.fr>
2019-04-19 9:44 ` Matthieu Moy
[not found] ` <3d2ba75520b74c2e9e8251c41d6632ba@BPMBX2013-01.univ-lyon1.fr>
2019-04-18 9:56 ` Matthieu Moy
2019-04-04 12:22 Corentin BOMPARD
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190419160046.5283-1-corentin.bompard@etu.univ-lyon1.fr \
--to=corentin.bompard@etu.univ-lyon1.fr \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).