Message ID | a29943d7bbc11a524089348a4abbd33c7514eee9.1592951611.git.gitgitgadget@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Allow overriding the default name of the default branch | expand |
"Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com> writes: > @@ -1046,7 +1046,7 @@ static int push_refs(struct transport *transport, > if (!remote_refs) { > fprintf(stderr, > _("No refs in common and none specified; doing nothing.\n" > - "Perhaps you should specify a branch such as 'master'.\n")); > + "Perhaps you should specify a specific branch.\n")); Hmph, not just "specify a branch."? Maybe it is just me, but "specify a specific branch" did not roll well on my tongue.
Hi Junio, On Tue, 23 Jun 2020, Junio C Hamano wrote: > "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com> > writes: > > > @@ -1046,7 +1046,7 @@ static int push_refs(struct transport *transport, > > if (!remote_refs) { > > fprintf(stderr, > > _("No refs in common and none specified; doing nothing.\n" > > - "Perhaps you should specify a branch such as 'master'.\n")); > > + "Perhaps you should specify a specific branch.\n")); > > Hmph, not just "specify a branch."? Maybe it is just me, but > "specify a specific branch" did not roll well on my tongue. Oh well. "Perhaps you should specify a branch" sounded too judgmental to me, but I'm not a native speaker, so I simply removed the word "specific". Ciao, Dscho
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes: > Hi Junio, > > On Tue, 23 Jun 2020, Junio C Hamano wrote: > >> "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com> >> writes: >> >> > @@ -1046,7 +1046,7 @@ static int push_refs(struct transport *transport, >> > if (!remote_refs) { >> > fprintf(stderr, >> > _("No refs in common and none specified; doing nothing.\n" >> > - "Perhaps you should specify a branch such as 'master'.\n")); >> > + "Perhaps you should specify a specific branch.\n")); >> >> Hmph, not just "specify a branch."? Maybe it is just me, but >> "specify a specific branch" did not roll well on my tongue. > > Oh well. "Perhaps you should specify a branch" sounded too judgmental to > me, but I'm not a native speaker, so I simply removed the word "specific". I'm not either. Note that when I say "maybe it is just me", I usually am not asking to change anything.
Hi Junio, On Wed, 24 Jun 2020, Junio C Hamano wrote: > Johannes Schindelin <Johannes.Schindelin@gmx.de> writes: > > > On Tue, 23 Jun 2020, Junio C Hamano wrote: > > > >> "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com> > >> writes: > >> > >> > @@ -1046,7 +1046,7 @@ static int push_refs(struct transport *transport, > >> > if (!remote_refs) { > >> > fprintf(stderr, > >> > _("No refs in common and none specified; doing nothing.\n" > >> > - "Perhaps you should specify a branch such as 'master'.\n")); > >> > + "Perhaps you should specify a specific branch.\n")); > >> > >> Hmph, not just "specify a branch."? Maybe it is just me, but > >> "specify a specific branch" did not roll well on my tongue. > > > > Oh well. "Perhaps you should specify a branch" sounded too judgmental to > > me, but I'm not a native speaker, so I simply removed the word "specific". > > I'm not either. We should start a society or something ;-) > Note that when I say "maybe it is just me", I usually am not asking to > change anything. Of course! In this instance, your suggestion made me think and prefer the non-repetitive version (because let's face it, taking out that word did not make it any more or less judgemental). Ciao, Dscho
diff --git a/send-pack.c b/send-pack.c index 0abee22283..db79cdac77 100644 --- a/send-pack.c +++ b/send-pack.c @@ -406,7 +406,7 @@ int send_pack(struct send_pack_args *args, if (!remote_refs) { fprintf(stderr, "No refs in common and none specified; doing nothing.\n" - "Perhaps you should specify a branch such as 'master'.\n"); + "Perhaps you should specify a specific branch.\n"); return 0; } if (args->atomic && !atomic_supported) diff --git a/t/t5528-push-default.sh b/t/t5528-push-default.sh index 4d1e0c363e..68b84c4add 100755 --- a/t/t5528-push-default.sh +++ b/t/t5528-push-default.sh @@ -98,6 +98,12 @@ test_expect_success 'push from/to new branch with upstream, matching and simple' test_push_failure upstream ' +test_expect_success '"matching" fails if none match' ' + git init --bare empty && + test_must_fail git push empty : 2>actual && + test_i18ngrep "Perhaps you should specify a specific branch" actual +' + test_expect_success 'push ambiguously named branch with upstream, matching and simple' ' git checkout -b ambiguous && test_config branch.ambiguous.remote parent1 && diff --git a/transport-helper.c b/transport-helper.c index a46afcb69d..b81a3486bd 100644 --- a/transport-helper.c +++ b/transport-helper.c @@ -1046,7 +1046,7 @@ static int push_refs(struct transport *transport, if (!remote_refs) { fprintf(stderr, _("No refs in common and none specified; doing nothing.\n" - "Perhaps you should specify a branch such as 'master'.\n")); + "Perhaps you should specify a specific branch.\n")); return 0; }