From: Vasco Almeida Date: Fri, 27 May 2016 10:17:27 GMT Subject: Re: [PATCH v2 13/22] i18n: git-sh-setup.sh: mark strings for translation Message-ID: <57481EB7.10809@sapo.pt> In-Reply-To: Às 22:46 de 26-05-2016, Junio C Hamano escreveu: > Vasco Almeida 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. > I was not aware about this issue. I agree with you and I'll fix this and other instances you mentioned, in the next re-roll.