fetch.c: fix typo in a warning message
cover fetch.c: fix typo in a warning message
Noticed this while reviewing German translation.
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
Signature · 1 line
gitgitgadget
PATCH 1/1 fetch.c: fix typo in a warning message
From: Ralf Thielow <[email protected]>
--- builtin/fetch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
builtin/fetch.c +1 -1
@@ -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;
Signature · 1 line
gitgitgadget
Quoted 4 lines · Ralf Thielow
Signed-off-by Ralf Thielow <[email protected]>--- builtin/fetch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 1 line
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.
builtin/fetch.c static int do_fetch(struct transport *transport, · line 1414
Quoted 10 lines
builtin/fetch.c +1
-1@@ -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
Am Do., 31. Okt. 2019 um 23:53 Uhr schrieb Jonathan Nieder <[email protected]>:
Quoted 10 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
Quoted 7 lines · Jonathan Nieder
Quoted 4 lines · Ralf Thielow
Signed-off-by Ralf Thielow <[email protected]>--- builtin/fetch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 6 lines
Reviewed-by Jonathan Nieder <[email protected]>builtin/fetch.c static int do_fetch(struct transport *transport, · line 1414
Quoted 3 lines
builtin/fetch.c +1
-1if (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.