# [PATCH 0/1] fetch.c: fix typo in a warning message

5 messages from 2019-10-31 to 2019-11-02. Participants: Ralf Thielow via GitGitGadget, Jonathan Nieder, Ralf Thielow, Junio C Hamano.
Thread: https://gitlist.dev/t/52168

## Ralf Thielow via GitGitGadget, 2019-10-31 20:41

Subject: [PATCH 0/1] fetch.c: fix typo in a warning message
Message-ID: <pull.441.git.1572554506.gitgitgadget@gmail.com>
URL: https://gitlist.dev/e/pull.441.git.1572554506.gitgitgadget%40gmail.com

```
Noticed this while reviewing German translation.

Cc: Matthias Rüster matthias.ruester@gmail.com [matthias.ruester@gmail.com]

Ralf Thielow (1):
  fetch.c: fix typo in a warning message

 builtin/fetch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


base-commit: f21f8f5d35b09ecdd1a0112f114436fd2eda7df2
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-441%2Fralfth%2Ffetch-fix-warning-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-441/ralfth/fetch-fix-warning-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/441
-- 
gitgitgadget

```

## Ralf Thielow via GitGitGadget, 2019-10-31 20:41

Subject: [PATCH 1/1] fetch.c: fix typo in a warning message
Message-ID: <70f10fe44716e50765a9d8f7794116f390f09dbc.1572554506.git.gitgitgadget@gmail.com>
URL: https://gitlist.dev/e/70f10fe44716e50765a9d8f7794116f390f09dbc.1572554506.git.gitgitgadget%40gmail.com
In-Reply-To: <pull.441.git.1572554506.gitgitgadget@gmail.com>

```
From: Ralf Thielow <ralf.thielow@gmail.com>

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
---
 builtin/fetch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/builtin/fetch.c b/builtin/fetch.c
index 0c345b5dfe..f9a934f098 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -1411,7 +1411,7 @@ static int do_fetch(struct transport *transport,
 		for (rm = ref_map; rm; rm = rm->next) {
 			if (!rm->peer_ref) {
 				if (source_ref) {
-					warning(_("multiple branch detected, incompatible with --set-upstream"));
+					warning(_("multiple branches detected, incompatible with --set-upstream"));
 					goto skip;
 				} else {
 					source_ref = rm;
-- 
gitgitgadget

```

## Jonathan Nieder, 2019-10-31 22:53

Subject: Re: [PATCH 1/1] fetch.c: fix typo in a warning message
Message-ID: <20191031225310.GA211076@google.com>
URL: https://gitlist.dev/e/20191031225310.GA211076%40google.com
In-Reply-To: <70f10fe44716e50765a9d8f7794116f390f09dbc.1572554506.git.gitgitgadget@gmail.com>

```
Ralf Thielow wrote:

> Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
> ---
>  builtin/fetch.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>

> Noticed this while reviewing German translation.

This kind of context tends to be useful in a commit message --- it
helps clarify the motivation behind the change.

> diff --git a/builtin/fetch.c b/builtin/fetch.c
> index 0c345b5dfe..f9a934f098 100644
> --- a/builtin/fetch.c
> +++ b/builtin/fetch.c
> @@ -1411,7 +1411,7 @@ static int do_fetch(struct transport *transport,
>  		for (rm = ref_map; rm; rm = rm->next) {
>  			if (!rm->peer_ref) {
>  				if (source_ref) {
> -					warning(_("multiple branch detected, incompatible with --set-upstream"));
> +					warning(_("multiple branches detected, incompatible with --set-upstream"));

Long line.

I wonder what this warning is trying to say.  How would I go about
triggering this message?  The comment before says

	The relevant upstream is the fetched branch that is meant to
	be merged with the current one, i.e. the one fetched to
	FETCH_HEAD.

So is this about when I'm fetching with a wildcard or something?

Thanks,
Jonathan

```

## Ralf Thielow, 2019-11-01 09:48

Subject: Re: [PATCH 1/1] fetch.c: fix typo in a warning message
Message-ID: <CAN0XMOLDZo06Xa-Q9qVrVNk_J3+b2sP5e30f=_9s3nUw-B_JvQ@mail.gmail.com>
URL: https://gitlist.dev/e/CAN0XMOLDZo06Xa-Q9qVrVNk_J3%2Bb2sP5e30f%3D_9s3nUw-B_JvQ%40mail.gmail.com
In-Reply-To: <20191031225310.GA211076@google.com>

```
Am Do., 31. Okt. 2019 um 23:53 Uhr schrieb Jonathan Nieder <jrnieder@gmail.com>:
>
> I wonder what this warning is trying to say.  How would I go about
> triggering this message?  The comment before says
>
>         The relevant upstream is the fetched branch that is meant to
>         be merged with the current one, i.e. the one fetched to
>         FETCH_HEAD.
>
> So is this about when I'm fetching with a wildcard or something?
>

The message shows up when multiple refspecs/branches are passed,
like

$ git fetch --set-upstream origin master next
From https://github.com/git/git
 * branch                  master     -> FETCH_HEAD
 * branch                  next       -> FETCH_HEAD
warning: multiple branch detected, incompatible with --set-upstream

```

## Junio C Hamano, 2019-11-02 05:50

Subject: Re: [PATCH 1/1] fetch.c: fix typo in a warning message
Message-ID: <xmqqzhhe3jyr.fsf@gitster-ct.c.googlers.com>
URL: https://gitlist.dev/e/xmqqzhhe3jyr.fsf%40gitster-ct.c.googlers.com
In-Reply-To: <20191031225310.GA211076@google.com>

```
Jonathan Nieder <jrnieder@gmail.com> writes:

> Ralf Thielow wrote:
>
>> Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
>> ---
>>  builtin/fetch.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
>>  				if (source_ref) {
>> -					warning(_("multiple branch detected, incompatible with --set-upstream"));
>> +					warning(_("multiple branches detected, incompatible with --set-upstream"));
>
> Long line.


Thanks, both.  This close to the final, I am reluctant to touch any
string inside _(), so let's postpone it to the next cycle, though.

```
