Re: [PATCH 2/2] unpack-trees.c: align submodule error message to the other error messages
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Mar 29, 2017, 18:48 UTC
- Message-ID
- <20170329184833.GX31294@aiede.mtv.corp.google.com>
- In-Reply-To
- <20170329183743.27506-2-sbeller@google.com>
Stefan Beller wrote:
> As the place holder in the error message is for multiple submodules, > we don't want to encapsulate the string place holder in single quotes.
Makes sense.
Show 15 quoted lines
> Signed-off-by: Stefan Beller <sbeller@google.com>
> ---
> unpack-trees.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/unpack-trees.c b/unpack-trees.c
> index 8333da2cc9..9f386cc174 100644
> --- a/unpack-trees.c
> +++ b/unpack-trees.c
> @@ -167,7 +167,7 @@ void setup_unpack_trees_porcelain(struct unpack_trees_options *opts,
> msgs[ERROR_WOULD_LOSE_ORPHANED_REMOVED] =
> _("The following working tree files would be removed by sparse checkout update:\n%s");
> msgs[ERROR_WOULD_LOSE_SUBMODULE] =
> - _("Submodule '%s' cannot checkout new HEAD");
> + _("The following submodules cannot checkout a new HEAD:\n%s");Nitpicking about wording: unless the user has adopted a strongly object-oriented point of view, it is Git that cannot checkout a new HEAD, not the submodule.
How about:
_("Cannot update submodule:\n%s")That's vague, but if I understand correctly the way this error gets used is equally vague --- i.e., a clearer message would involve finer-grained error codes.
Thanks, Jonathan