All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] contrib/git-subtree: Use /bin/sh interpreter instead of /bin/bash
@ 2013-05-20 20:24 Dmitry Marakasov
  2013-05-20 22:36 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Marakasov @ 2013-05-20 20:24 UTC (permalink / raw)
  To: git

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.

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
 #
-- 
1.8.2.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] contrib/git-subtree: Use /bin/sh interpreter instead of /bin/bash
  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
  2013-05-21  7:55   ` John Keeping
  0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2013-05-20 22:36 UTC (permalink / raw)
  To: Dmitry Marakasov; +Cc: git

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] contrib/git-subtree: Use /bin/sh interpreter instead of /bin/bash
  2013-05-20 22:36 ` Junio C Hamano
@ 2013-05-21  7:55   ` John Keeping
  0 siblings, 0 replies; 3+ messages in thread
From: John Keeping @ 2013-05-21  7:55 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Dmitry Marakasov, git

On Mon, May 20, 2013 at 03:36:58PM -0700, Junio C Hamano wrote:
> 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).

I ran the test suite with dash and everything passed.

checkbashisms doesn't find any problems either.

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-05-21  7:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2013-05-21  7:55   ` John Keeping

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.