Re: [PATCH 2/6] reflog: remove i18n legos in pruning message

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

 



Nguyễn Thái Ngọc Duy wrote:

> --- a/builtin/reflog.c
> +++ b/builtin/reflog.c
> @@ -330,8 +330,12 @@ static int expire_reflog_ent(unsigned char *osha1, unsigned char *nsha1,
>  		printf("keep %s", message);
>  	return 0;
>   prune:
> -	if (!cb->newlog || cb->cmd->verbose)
> -		printf("%sprune %s", cb->newlog ? "" : "would ", message);
> +	if (!cb->newlog || cb->cmd->verbose) {
> +		if (cb->newlog)
> +			printf("prune %s", message);
> +		else
> +			printf("would prune %s", message);
> +	}

Thanks.  Style: how about

	if (!cb->newlog)
		printf("would prune %s", message);
	else if (cb->cmd->verbose)
		printf("prune %s", message);

?  I think that would be more readable than the lego original.

BTW I'm not sure if this message would be a good candidate for
translation.  Especially in the --dry-run case, it feels like output
that is intended to be simple enough for scripts to parse.  (Though on
the other hand, I don't know of any scripts or use cases that actually
parse it, so maybe nobody would mind.)
--
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]