Re: [PATCH] Get rid of the non portable shell export VAR=VALUE costruct

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



5-22 14.48, Elia Pinto wrote:
>> Found by check-non-portable-shell.pl
>
> Thanks for picking this up
>> -export TEST_DIRECTORY=$(pwd)/../../../t
>> +TEST_DIRECTORY=$(pwd)/../../../t && export TEST_DIRECTORY
> Minor remark:
> Both commands should go on their own line, like this:
>
> TEST_DIRECTORY=$(pwd)/../../../t &&
> export TEST_DIRECTORY
>
Apparently they are both common idioms and I find no indication in the
CodingGuideline.

I have no problems rerolling  this simple patch, but i need to know
what is the (git) right style in this case.

Thanks
------

cd ./git-core

 grep "&&.*export" *.sh
git-am.sh:          GIT_MERGE_VERBOSITY=0 && export GIT_MERGE_VERBOSITY
git-filter-branch.sh:   echo "case \"\$GIT_$1_NAME\" in \"\")
GIT_$1_NAME=\"\${GIT_$1_EMAIL%%@*}\" && export GIT_$1_NAME;; esac"
git-filter-branch.sh:   GIT_DIR="$ORIG_GIT_DIR" && export GIT_DIR
git-rebase--merge.sh:           GIT_MERGE_VERBOSITY=1 && export
GIT_MERGE_VERBOSITY
git-remote-testgit.sh:GIT_DIR="$url/.git" && export GIT_DIR
git-stash.sh:                           GIT_INDEX_FILE="$TMPindex" &&
export GIT_INDEX_FILE &&
git-stash.sh:           GIT_MERGE_VERBOSITY=0 && export GIT_MERGE_VERBOSITY

grep 'export.*&&' *.sh
git-stash.sh:                           GIT_INDEX_FILE="$TMPindex" &&
export GIT_INDEX_FILE &&
git-stash.sh:                   export GIT_INDEX_FILE &&

>
> And, unrelated to this patch,
> there seem to be a lot of && missing in git-remote-testgit.sh.
> But this should be a seperate patch, I think.
>
>
>
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]