Às 22:46 de 26-05-2016, Junio C Hamano escreveu: > Vasco Almeida <vascomalme...@sapo.pt> 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. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
- [PATCH v2 15/22] i18n: rebase-interactive: mark here-doc st... Vasco Almeida
- [PATCH v2 12/22] t6030: update to use test_i18ncmp Vasco Almeida
- [PATCH v2 11/22] i18n: bisect: simplify error message for i... Vasco Almeida
- [PATCH v2 04/22] i18n: transport: mark strings for translat... Vasco Almeida
- [PATCH v2 19/22] tests: unpack-trees: update to use test_i1... Vasco Almeida
- [PATCH v2 17/22] i18n: setup: mark strings for translation Vasco Almeida
- [PATCH v2 21/22] t4153: fix negated test_i18ngrep call Vasco Almeida
- [PATCH v2 13/22] i18n: git-sh-setup.sh: mark strings for tr... Vasco Almeida
- Re: [PATCH v2 13/22] i18n: git-sh-setup.sh: mark strin... Junio C Hamano
- Re: [PATCH v2 13/22] i18n: git-sh-setup.sh: mark s... Vasco Almeida
- [PATCH v2 18/22] tests: use test_i18n* functions to suppres... Vasco Almeida
- Re: [PATCH v2 18/22] tests: use test_i18n* functions t... Junio C Hamano
- Re: [PATCH v2 18/22] tests: use test_i18n* functio... Vasco Almeida
- Re: [PATCH v2 18/22] tests: use test_i18n* fun... Junio C Hamano
- [PATCH v2 14/22] i18n: rebase-interactive: mark strings for... Vasco Almeida
- Re: [PATCH v2 14/22] i18n: rebase-interactive: mark st... Junio C Hamano
- Re: [PATCH v2 14/22] i18n: rebase-interactive: mar... Vasco Almeida
- Re: [PATCH v2 14/22] i18n: rebase-interactive:... Junio C Hamano
- [PATCH v2 20/22] t9003: become resilient to GETTEXT_POISON Vasco Almeida
- [PATCH v2 22/22] t5523: use test_i18ngrep for negation Vasco Almeida