# [PATCH] unpack-trees: fix English grammar in do-this-before-that messages

5 messages from 2016-06-24 to 2016-06-24. Participants: Alex Henrie, Matthieu Moy, Vasco Almeida, Junio C Hamano.
Thread: https://gitlist.dev/t/42701

## Alex Henrie, 2016-06-24 05:31

Subject: [PATCH] unpack-trees: fix English grammar in do-this-before-that messages
Message-ID: <20160624053135.7848-1-alexhenrie24@gmail.com>
URL: https://gitlist.dev/e/20160624053135.7848-1-alexhenrie24%40gmail.com

```
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
---
 unpack-trees.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/unpack-trees.c b/unpack-trees.c
index 6bc9512..11c37fb 100644
--- a/unpack-trees.c
+++ b/unpack-trees.c
@@ -62,17 +62,17 @@ void setup_unpack_trees_porcelain(struct unpack_trees_options *opts,
 	if (!strcmp(cmd, "checkout"))
 		msg = advice_commit_before_merge
 		      ? _("Your local changes to the following files would be overwritten by checkout:\n%%s"
-			  "Please commit your changes or stash them before you can switch branches.")
+			  "Please commit your changes or stash them before you switch branches.")
 		      : _("Your local changes to the following files would be overwritten by checkout:\n%%s");
 	else if (!strcmp(cmd, "merge"))
 		msg = advice_commit_before_merge
 		      ? _("Your local changes to the following files would be overwritten by merge:\n%%s"
-			  "Please commit your changes or stash them before you can merge.")
+			  "Please commit your changes or stash them before you merge.")
 		      : _("Your local changes to the following files would be overwritten by merge:\n%%s");
 	else
 		msg = advice_commit_before_merge
 		      ? _("Your local changes to the following files would be overwritten by %s:\n%%s"
-			  "Please commit your changes or stash them before you can %s.")
+			  "Please commit your changes or stash them before you %s.")
 		      : _("Your local changes to the following files would be overwritten by %s:\n%%s");
 	msgs[ERROR_WOULD_OVERWRITE] = msgs[ERROR_NOT_UPTODATE_FILE] =
 		xstrfmt(msg, cmd, cmd);
@@ -83,34 +83,34 @@ void setup_unpack_trees_porcelain(struct unpack_trees_options *opts,
 	if (!strcmp(cmd, "checkout"))
 		msg = advice_commit_before_merge
 		      ? _("The following untracked working tree files would be removed by checkout:\n%%s"
-			  "Please move or remove them before you can switch branches.")
+			  "Please move or remove them before you switch branches.")
 		      : _("The following untracked working tree files would be removed by checkout:\n%%s");
 	else if (!strcmp(cmd, "merge"))
 		msg = advice_commit_before_merge
 		      ? _("The following untracked working tree files would be removed by merge:\n%%s"
-			  "Please move or remove them before you can merge.")
+			  "Please move or remove them before you merge.")
 		      : _("The following untracked working tree files would be removed by merge:\n%%s");
 	else
 		msg = advice_commit_before_merge
 		      ? _("The following untracked working tree files would be removed by %s:\n%%s"
-			  "Please move or remove them before you can %s.")
+			  "Please move or remove them before you %s.")
 		      : _("The following untracked working tree files would be removed by %s:\n%%s");
 	msgs[ERROR_WOULD_LOSE_UNTRACKED_REMOVED] = xstrfmt(msg, cmd, cmd);
 
 	if (!strcmp(cmd, "checkout"))
 		msg = advice_commit_before_merge
 		      ? _("The following untracked working tree files would be overwritten by checkout:\n%%s"
-			  "Please move or remove them before you can switch branches.")
+			  "Please move or remove them before you switch branches.")
 		      : _("The following untracked working tree files would be overwritten by checkout:\n%%s");
 	else if (!strcmp(cmd, "merge"))
 		msg = advice_commit_before_merge
 		      ? _("The following untracked working tree files would be overwritten by merge:\n%%s"
-			  "Please move or remove them before you can merge.")
+			  "Please move or remove them before you merge.")
 		      : _("The following untracked working tree files would be overwritten by merge:\n%%s");
 	else
 		msg = advice_commit_before_merge
 		      ? _("The following untracked working tree files would be overwritten by %s:\n%%s"
-			  "Please move or remove them before you can %s.")
+			  "Please move or remove them before you %s.")
 		      : _("The following untracked working tree files would be overwritten by %s:\n%%s");
 	msgs[ERROR_WOULD_LOSE_UNTRACKED_OVERWRITTEN] = xstrfmt(msg, cmd, cmd);
 
-- 
2.9.0


```

## Matthieu Moy, 2016-06-24 09:26

Subject: Re: [PATCH] unpack-trees: fix English grammar in do-this-before-that messages
Message-ID: <vpqeg7nj5tk.fsf@anie.imag.fr>
URL: https://gitlist.dev/e/vpqeg7nj5tk.fsf%40anie.imag.fr
In-Reply-To: <20160624053135.7848-1-alexhenrie24@gmail.com>

```
Alex Henrie <alexhenrie24@gmail.com> writes:

> Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
> ---
>  unpack-trees.c | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/unpack-trees.c b/unpack-trees.c
> index 6bc9512..11c37fb 100644
> --- a/unpack-trees.c
> +++ b/unpack-trees.c
> @@ -62,17 +62,17 @@ void setup_unpack_trees_porcelain(struct unpack_trees_options *opts,
>  	if (!strcmp(cmd, "checkout"))
>  		msg = advice_commit_before_merge
>  		      ? _("Your local changes to the following files would be overwritten by checkout:\n%%s"
> -			  "Please commit your changes or stash them before you can switch branches.")
> +			  "Please commit your changes or stash them before you switch branches.")

I'm not a native speaker, but I think both versions are correct.

I'm OK with the change, though. Dropping something useless is usually a
good thing :-).

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

```

## Vasco Almeida, 2016-06-24 11:39

Subject: Re: [PATCH] unpack-trees: fix English grammar in do-this-before-that messages
Message-ID: <576D1BEA.8020509@sapo.pt>
URL: https://gitlist.dev/e/576D1BEA.8020509%40sapo.pt
In-Reply-To: <20160624053135.7848-1-alexhenrie24@gmail.com>

```
Às 05:31 de 24-06-2016, Alex Henrie escreveu:
> Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
> ---
>  unpack-trees.c | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/unpack-trees.c b/unpack-trees.c
> index 6bc9512..11c37fb 100644
> --- a/unpack-trees.c
> +++ b/unpack-trees.c
> @@ -62,17 +62,17 @@ void setup_unpack_trees_porcelain(struct unpack_trees_options *opts,
>  	if (!strcmp(cmd, "checkout"))
>  		msg = advice_commit_before_merge
>  		      ? _("Your local changes to the following files would be overwritten by checkout:\n%%s"
> -			  "Please commit your changes or stash them before you can switch branches.")
> +			  "Please commit your changes or stash them before you switch branches.")
>  		      : _("Your local changes to the following files would be overwritten by checkout:\n%%s");

The only downside I can tell about this is translator are going to have
to update those strings on their translations, but that is a normal
thing to do on an active project like Git.

I'm not a native speak either, but I think I have translated that as if
the sentences were like this patch introduces. I agree with this change.

```

## Junio C Hamano, 2016-06-24 22:28

Subject: Re: [PATCH] unpack-trees: fix English grammar in do-this-before-that messages
Message-ID: <xmqqoa6qdxxk.fsf@gitster.mtv.corp.google.com>
URL: https://gitlist.dev/e/xmqqoa6qdxxk.fsf%40gitster.mtv.corp.google.com
In-Reply-To: <576D1BEA.8020509@sapo.pt>

```
Vasco Almeida <vascomalmeida@sapo.pt> writes:

> The only downside I can tell about this is translator are going to have
> to update those strings on their translations, but that is a normal
> thing to do on an active project like Git.

A larger issue is this fails to update tests that check these
messages.


```

## Vasco Almeida, 2016-06-24 23:02

Subject: Re: [PATCH] unpack-trees: fix English grammar in do-this-before-that messages
Message-ID: <20160625000251.Horde.vVfLKdUIk3yyVI6IH45x6TN@mail.sapo.pt>
URL: https://gitlist.dev/e/20160625000251.Horde.vVfLKdUIk3yyVI6IH45x6TN%40mail.sapo.pt
In-Reply-To: <xmqqoa6qdxxk.fsf@gitster.mtv.corp.google.com>

```
Citando Junio C Hamano <gitster@pobox.com>:

> Vasco Almeida <vascomalmeida@sapo.pt> writes:
>
>> The only downside I can tell about this is translator are going to have
>> to update those strings on their translations, but that is a normal
>> thing to do on an active project like Git.
>
> A larger issue is this fails to update tests that check these
> messages.

Yes, I forget about tests :-). Alex Henrie, or someone else, should  
update the tests to reflect this change if it is to go forward.


```
