Gentoo Archives: gentoo-dev

From: Ulrich Mueller <ulm@g.o>
To: "Michał Górny" <mgorny@g.o>
Cc: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH] git-r3.eclass: respect EVCS_UMASK
Date: Mon, 02 Feb 2015 09:46:47
Message-Id: 21711.18298.602169.477382@a1i15.kph.uni-mainz.de
In Reply to: Re: [gentoo-dev] [PATCH] git-r3.eclass: respect EVCS_UMASK by Ulrich Mueller
1 >>>>> On Sun, 1 Feb 2015, I wrote:
2
3 >>>>> On Sun, 1 Feb 2015, Michał Górny wrote:
4
5 >>> + local restore_umask=":"
6 >>> + if [[ ${EVCS_UMASK} ]]; then
7 >>> + restore_umask=$(umask -p)
8 >>> + umask "${EVCS_UMASK}" || die "Bad options to umask: ${EVCS_UMASK}"
9 >>> + fi
10 >>> mkdir "${GIT_DIR}" || die
11 >>> git init --bare || die
12 >>> + ${restore_umask} || die
13
14 >> And this has ugly implicit pattern expansion. Don't do such things.
15 >> Ever. Even if you want to split commands.
16
17 > Please show me how this could possibly cause any problem here.
18 > restore_umask can only have well-defined values, either ":" or
19 > the output of "umask -p" which is intended to be used this way.
20
21 Anyway, since you don't seem to like the way it is coded, I've
22 attached an updated patch.
23
24 Ulrich

Attachments

File name MIME type
git-r3.eclass.diff text/plain

Replies

Subject Author
Re: [gentoo-dev] [PATCH] git-r3.eclass: respect EVCS_UMASK "Michał Górny" <mgorny@g.o>