>>>>> On Sun, 1 Feb 2015, Michał Górny wrote:

>> @@ -309,8 +320,14 @@ _git-r3_set_gitdir() {
>> 
>> addwrite "${EGIT3_STORE_DIR}"
>> if [[ ! -d ${GIT_DIR} ]]; then
>> +            local restore_umask=":"
>> +            if [[ ${EVCS_UMASK} ]]; then
>> +                    restore_umask=$(umask -p)

> I think that -p is GNU-ism.

Of course it is. But it is a shell builtin command, and we require
bash for ebuilds, not POSIX shell.

>> +                    umask "${EVCS_UMASK}" || die "Bad options to umask: 
>> ${EVCS_UMASK}"
>> +            fi
>> mkdir "${GIT_DIR}" || die
>> git init --bare || die
>> +            ${restore_umask} || die

> And this has ugly implicit pattern expansion. Don't do such things.
> Ever. Even if you want to split commands.

Please show me how this could possibly cause any problem here.
restore_umask can only have well-defined values, either ":" or the
output of "umask -p" which is intended to be used this way.

Ulrich

Attachment: pgpVXXg52qAub.pgp
Description: PGP signature

Reply via email to