threads / patch / 55716

patchfetch: improve grammar of "shallow roots" message

Subject: [PATCH] fetch: improve grammar of "shallow roots" message

## tl;dr

6 messages between May 18, 2021 and May 20, 2021. Diffs are folded; open one to read it.

replies: 5people: 4as markdown or json

Alex Henrie· May 18, 2021, 06:18 UTC · lore
Signed-off-by: Alex Henrie <alexhenrie24@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 97c4fe6e6d..c19a041526 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -1123,7 +1123,7 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,
 
 			if (rm->status == REF_STATUS_REJECT_SHALLOW) {
 				if (want_status == FETCH_HEAD_MERGE)
-					warning(_("reject %s because shallow roots are not allowed to be updated"),
+					warning(_("rejected %s because shallow roots are not allowed to be updated"),
 						rm->peer_ref ? rm->peer_ref->name : rm->name);
 				continue;
 			}
-- 
2.31.1
Junio C Hamano· May 19, 2021, 01:17 UTC · re: Alex Henrie · lore

Re: [PATCH] fetch: improve grammar of "shallow roots" message

Alex Henrie <alexhenrie24@gmail.com> writes:
> Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
> ---
>  builtin/fetch.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

This and the other one on setup.c both look good changes, but it's not like these messages are new breakages in the upcoming release whose -rc0 has already been tagged and call for help to translators has been issued, on which presumably translators are already working.

So please hold onto these patches until final; I might pick them up and keep them in 'seen' but I may not, and I do not want to see them lost.

Thanks.
Show 13 quoted lines
> diff --git a/builtin/fetch.c b/builtin/fetch.c
> index 97c4fe6e6d..c19a041526 100644
> --- a/builtin/fetch.c
> +++ b/builtin/fetch.c
> @@ -1123,7 +1123,7 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,
>  
>  			if (rm->status == REF_STATUS_REJECT_SHALLOW) {
>  				if (want_status == FETCH_HEAD_MERGE)
> -					warning(_("reject %s because shallow roots are not allowed to be updated"),
> +					warning(_("rejected %s because shallow roots are not allowed to be updated"),
>  						rm->peer_ref ? rm->peer_ref->name : rm->name);
>  				continue;
>  			}
Derrick Stolee· May 19, 2021, 13:55 UTC · re: Alex Henrie · lore

Re: [PATCH] fetch: improve grammar of "shallow roots" message

On 5/18/2021 2:18 AM, Alex Henrie wrote:
> - warning(_("reject %s because shallow roots are not allowed to be updated"),
> + warning(_("rejected %s because shallow roots are not allowed to be updated"),
This change to past-tense makes sense to me.

Thanks, -Stolee

Bagas Sanjaya· May 20, 2021, 02:22 UTC · re: Alex Henrie · lore

Re: [PATCH] fetch: improve grammar of "shallow roots" message

On 18/05/21 13.18, Alex Henrie wrote:
> -					warning(_("reject %s because shallow roots are not allowed to be updated"),
> +					warning(_("rejected %s because shallow roots are not allowed to be updated"),
 From descriptive to null-subject past tense, right?
-- 
An old man doll... just what I always wanted! - Clara
Alex Henrie· May 20, 2021, 04:02 UTC · re: Bagas Sanjaya · lore

Re: [PATCH] fetch: improve grammar of "shallow roots" message

On Wed, May 19, 2021 at 8:22 PM Bagas Sanjaya <bagasdotme@gmail.com> wrote:
Show 7 quoted lines
>
> On 18/05/21 13.18, Alex Henrie wrote:
>
> > -                                     warning(_("reject %s because shallow roots are not allowed to be updated"),
> > +                                     warning(_("rejected %s because shallow roots are not allowed to be updated"),
>
>  From descriptive to null-subject past tense, right?

I'm not sure what the best way is to describe the grammar here. I would say that the "ed" makes it clear that the message is a description of what did happen rather than an imperative command concerning what should happen.

-Alex
Bagas Sanjaya· May 20, 2021, 05:03 UTC · re: Alex Henrie · lore

Re: [PATCH] fetch: improve grammar of "shallow roots" message

On 20/05/21 11.02, Alex Henrie wrote:
Show 16 quoted lines
> On Wed, May 19, 2021 at 8:22 PM Bagas Sanjaya <bagasdotme@gmail.com> wrote:
>>
>> On 18/05/21 13.18, Alex Henrie wrote:
>>
>>> -                                     warning(_("reject %s because shallow roots are not allowed to be updated"),
>>> +                                     warning(_("rejected %s because shallow roots are not allowed to be updated"),
>>
>>   From descriptive to null-subject past tense, right?
> 
> I'm not sure what the best way is to describe the grammar here. I
> would say that the "ed" makes it clear that the message is a
> description of what did happen rather than an imperative command
> concerning what should happen.
> 
> -Alex
> 
Looks OK.

So the error had happened, and we needed to express the situation. Because it happened on the past, using past tense was obviously the right thing.

Reviewed-by: Bagas Sanjaya <bagasdotme@gmail.com>
-- 
An old man doll... just what I always wanted! - Clara

← back to recent threads