Re: [PATCH 2/8] mv: no "Huh?" to the user

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Nguyễn Thái Ngọc Duy  <pclouds@xxxxxxxxx> writes:

> Although if we are frisky, this could do
>
>    static NORETURN void die_builtin(const char *err, va_list params)
>    {
>   -	vreportf("fatal: ", err, params);
>   +	vreportf("Huh? ", err, params);
>    	exit(128);
>    }

;-)

While at it we may want to remove the extra SP between dies and
their opening parentheses.

> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx>
> ---
>  builtin/mv.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/builtin/mv.c b/builtin/mv.c
> index b892f63..a7e02c0 100644
> --- a/builtin/mv.c
> +++ b/builtin/mv.c
> @@ -135,7 +135,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
>  			if (first >= 0) {
>  				struct strbuf submodule_dotgit = STRBUF_INIT;
>  				if (!S_ISGITLINK(active_cache[first]->ce_mode))
> -					die (_("Huh? Directory %s is in index and no submodule?"), src);
> +					die (_("Directory %s is in index and no submodule?"), src);
>  				if (!is_staging_gitmodules_ok())
>  					die (_("Please, stage your changes to .gitmodules or stash them to proceed"));
>  				strbuf_addf(&submodule_dotgit, "%s/.git", src);
> @@ -153,8 +153,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
>  
>  				first = cache_name_pos(src_w_slash, len_w_slash);
>  				if (first >= 0)
> -					die (_("Huh? %.*s is in index?"),
> -							len_w_slash, src_w_slash);
> +					die (_("%.*s is in index"), len_w_slash, src_w_slash);
>  
>  				first = -1 - first;
>  				for (last = first; last < active_nr; last++) {
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]