git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Elia Pinto <gitter.spiros@gmail.com>
To: "Torsten Bögershausen" <tboegi@web.de>, dak@gnu.org
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: [PATCH] Get rid of the non portable shell export VAR=VALUE costruct
Date: Thu, 22 May 2014 15:57:40 +0200	[thread overview]
Message-ID: <CA+EOSBkmZRd7FiTNUfDPrUX4NivHR7HUL-+UqDzcpE+X7BQcOA@mail.gmail.com> (raw)
In-Reply-To: <537DF7F2.8000401@web.de>

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

  parent reply	other threads:[~2014-05-22 13:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-22 12:48 [PATCH] Get rid of the non portable shell export VAR=VALUE costruct Elia Pinto
2014-05-22 13:13 ` Torsten Bögershausen
2014-05-22 13:19   ` David Kastrup
2014-05-22 14:28     ` Johannes Sixt
2014-05-22 14:37       ` David Kastrup
2014-05-22 13:57   ` Elia Pinto [this message]
2014-05-22 23:42     ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+EOSBkmZRd7FiTNUfDPrUX4NivHR7HUL-+UqDzcpE+X7BQcOA@mail.gmail.com \
    --to=gitter.spiros@gmail.com \
    --cc=dak@gnu.org \
    --cc=git@vger.kernel.org \
    --cc=tboegi@web.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).