Re: [PATCH v2 13/22] i18n: git-sh-setup.sh: mark strings for translation

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

 



Vasco Almeida <vascomalmeida@xxxxxxx> writes:

>  require_work_tree_exists () {
> +	program_name=$0
>  	if test "z$(git rev-parse --is-bare-repository)" != zfalse
>  	then
> -		die "fatal: $0 cannot be used without a working tree."
> +		die "$(gettext "fatal: \$program_name cannot be used without a working tree.")"
>  	fi
>  }

This is probably quite a minor point, but I'd prefer if clobbering
the variable program_name is done between "then" and "fi", i.e. when
we know we are going to die, so the caller would not care.  Because
we are not in control of the caller's namespace use, and we do not
want bash-ism "local" here, that is the best we could do to make it
safer.

>  require_work_tree () {
> +	program_name=$0

Same here.

>  	test "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = true ||
> -	die "fatal: $0 cannot be used without a working tree."
> +		die "$(gettext "fatal: \$program_name cannot be used without a working tree.")"
>  }
>  
>  require_clean_work_tree () {
> +	action=$1
> +	hint=$2

Likewise.
--
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]