threads / patch / 52168

patchfetch.c: fix typo in a warning message

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

## tl;dr

5 messages between Oct 31, 2019 and Nov 2, 2019. Diffs are folded; open one to read it.

replies: 4people: 3as markdown or json

Ralf Thielow via GitGitGadget· Oct 31, 2019, 20:41 UTC · lore
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· Oct 31, 2019, 20:41 UTC · re: Ralf Thielow via GitGitGadget · lore

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

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(-)
Show changes to builtin/fetch.c +1 −1
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· Oct 31, 2019, 22:53 UTC · re: Ralf Thielow via GitGitGadget · lore

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

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.

Show 10 quoted lines
> 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· Nov 1, 2019, 09:48 UTC · re: Jonathan Nieder · lore

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

Am Do., 31. Okt. 2019 um 23:53 Uhr schrieb Jonathan Nieder <jrnieder@gmail.com>:
Show 10 quoted lines
>
> 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· Nov 2, 2019, 05:50 UTC · re: Jonathan Nieder · lore

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

Jonathan Nieder <jrnieder@gmail.com> writes:
Show 13 quoted lines
> 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.

← back to recent threads