Dnia 2015-02-01, o godz. 23:18:01
Ulrich Mueller <[email protected]> napisał(a):

> @@ -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.

> +                     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.

And before anyone suggests that, I asked ulm not to use
eumask_push/pop. If you ask why, read the eutils code and you'll
understand.

>       fi
>  }
>  
> @@ -508,6 +525,11 @@ git-r3_fetch() {
>  
>       # try to fetch from the remote
>       local r success
> +     local restore_umask=":"
> +     if [[ ${EVCS_UMASK} ]]; then
> +             restore_umask=$(umask -p)
> +             umask "${EVCS_UMASK}" || die "Bad options to umask: 
> ${EVCS_UMASK}"
> +     fi
>       for r in "${repos[@]}"; do
>               einfo "Fetching ${r} ..."
>  
> @@ -668,6 +690,7 @@ git-r3_fetch() {
>                       break
>               fi
>       done
> +     ${restore_umask} || die
>       [[ ${success} ]] || die "Unable to fetch from any of EGIT_REPO_URI"
>  
>       # submodules can reference commits in any branch



-- 
Best regards,
Michał Górny

Attachment: pgpkvpAn5DKAi.pgp
Description: OpenPGP digital signature

Reply via email to