git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Dmitry Marakasov <amdmi3@amdmi3.ru>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] contrib/git-subtree: Use /bin/sh interpreter instead of /bin/bash
Date: Mon, 20 May 2013 15:36:58 -0700	[thread overview]
Message-ID: <7vsj1hth11.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <20130520202434.GA3151@hades.panopticon> (Dmitry Marakasov's message of "Tue, 21 May 2013 00:24:34 +0400")

Dmitry Marakasov <amdmi3@amdmi3.ru> writes:

> Use /bin/sh interpreter instead of /bin/bash for contrib/git-subtree:
> it's required for systems which don't use bash by default (for example,
> FreeBSD), while there seem to be no bashisms in the script (confirmed
> by looking through the source and tesing subtree functionality with
> FreeBSD's /bin/sh) to require specifically bash and not the generic
> posix shell.

Has anybody audited to make sure that the script itself is free of
bash-isms?

I somehow had an impression that in the past it was littered with
bash-isms like function local variables and array variables and
assumed that the #!/bin/bash was necessary.  I did a quick
eyeballing and did not see anything glaringly bash-only, but I may
have missed something (the coding style is so different from the
core part of Git Porcelains and distracting for me to efficiently
do a good job of scanning).

>
> Signed-off-by: Dmitry Marakasov <amdmi3@amdmi3.ru>
> ---
>  contrib/subtree/git-subtree.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh
> index 8a23f58..5701376 100755
> --- a/contrib/subtree/git-subtree.sh
> +++ b/contrib/subtree/git-subtree.sh
> @@ -1,4 +1,4 @@
> -#!/bin/bash
> +#!/bin/sh
>  #
>  # git-subtree.sh: split/join git repositories in subdirectories of this one
>  #

  reply	other threads:[~2013-05-20 22:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-20 20:24 [PATCH] contrib/git-subtree: Use /bin/sh interpreter instead of /bin/bash Dmitry Marakasov
2013-05-20 22:36 ` Junio C Hamano [this message]
2013-05-21  7:55   ` John Keeping

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=7vsj1hth11.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=amdmi3@amdmi3.ru \
    --cc=git@vger.kernel.org \
    /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).