1 |
>>>>> On Sun, 1 Feb 2015, Michał Górny wrote: |
2 |
|
3 |
>> @@ -309,8 +320,14 @@ _git-r3_set_gitdir() { |
4 |
>> |
5 |
>> addwrite "${EGIT3_STORE_DIR}" |
6 |
>> if [[ ! -d ${GIT_DIR} ]]; then |
7 |
>> + local restore_umask=":" |
8 |
>> + if [[ ${EVCS_UMASK} ]]; then |
9 |
>> + restore_umask=$(umask -p) |
10 |
|
11 |
> I think that -p is GNU-ism. |
12 |
|
13 |
Of course it is. But it is a shell builtin command, and we require |
14 |
bash for ebuilds, not POSIX shell. |
15 |
|
16 |
>> + umask "${EVCS_UMASK}" || die "Bad options to umask: ${EVCS_UMASK}" |
17 |
>> + fi |
18 |
>> mkdir "${GIT_DIR}" || die |
19 |
>> git init --bare || die |
20 |
>> + ${restore_umask} || die |
21 |
|
22 |
> And this has ugly implicit pattern expansion. Don't do such things. |
23 |
> Ever. Even if you want to split commands. |
24 |
|
25 |
Please show me how this could possibly cause any problem here. |
26 |
restore_umask can only have well-defined values, either ":" or the |
27 |
output of "umask -p" which is intended to be used this way. |
28 |
|
29 |
Ulrich |