# [StGIT PATCH] diffcol.sh: Use /bin/bash explicitly

3 messages from 2008-09-03 to 2008-09-05. Participants: Shinya Kuribayashi, Karl Hasselström, Catalin Marinas.
Thread: https://gitlist.dev/t/15357

## Shinya Kuribayashi, 2008-09-03 15:47

Subject: [StGIT PATCH] diffcol.sh: Use /bin/bash explicitly
Message-ID: <48BEB185.2080505@ruby.dti.ne.jp>
URL: https://gitlist.dev/e/48BEB185.2080505%40ruby.dti.ne.jp

```
Recent Ubuntu uses dash (Debian Almquist Shell; a lightweight POSIX-
compliant shell derived from ash) as /bin/sh by default.  In this case
pager=diffcol.sh doesn't work like this:

> skuribay@ubuntu:~/kernel/linux.git$ stg show
> /home/skuribay/share/stgit/contrib/diffcol.sh: 22: Bad substitution

this is caused by non-bash-compliant /bin/sh.

diffcol.sh is based on Quilt, and Quilt is dependent on bash; Actually
all Quilt scripts use /bin/bash without exceptions.  Then it's good for
diffcol.sh to use /bin/bash.

Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
---
 contrib/diffcol.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/contrib/diffcol.sh b/contrib/diffcol.sh
index ea9109d..eecc87a 100755
--- a/contrib/diffcol.sh
+++ b/contrib/diffcol.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 # Code copied from Quilt (http://savannah.nongnu.org/projects/quilt)
 #

```

## Karl Hasselström, 2008-09-03 16:21

Subject: Re: [StGIT PATCH] diffcol.sh: Use /bin/bash explicitly
Message-ID: <20080903162123.GA874@diana.vm.bytemark.co.uk>
URL: https://gitlist.dev/e/20080903162123.GA874%40diana.vm.bytemark.co.uk
In-Reply-To: <48BEB185.2080505@ruby.dti.ne.jp>

```
On 2008-09-04 00:47:17 +0900, Shinya Kuribayashi wrote:

> diffcol.sh is based on Quilt, and Quilt is dependent on bash;
> Actually all Quilt scripts use /bin/bash without exceptions. Then
> it's good for diffcol.sh to use /bin/bash.

Thanks for this, and the other patch you sent. I'll be picking them up
this weekend, unless Catalin beats me to it.

-- 
Karl Hasselström, kha@treskal.com
      www.treskal.com/kalle

```

## Catalin Marinas, 2008-09-05 21:35

Subject: Re: [StGIT PATCH] diffcol.sh: Use /bin/bash explicitly
Message-ID: <b0943d9e0809051435g23fa3b83u2a1e8f2a3a6b955f@mail.gmail.com>
URL: https://gitlist.dev/e/b0943d9e0809051435g23fa3b83u2a1e8f2a3a6b955f%40mail.gmail.com
In-Reply-To: <20080903162123.GA874@diana.vm.bytemark.co.uk>

```
2008/9/3 Karl Hasselström <kha@treskal.com>:
> On 2008-09-04 00:47:17 +0900, Shinya Kuribayashi wrote:
>
>> diffcol.sh is based on Quilt, and Quilt is dependent on bash;
>> Actually all Quilt scripts use /bin/bash without exceptions. Then
>> it's good for diffcol.sh to use /bin/bash.
>
> Thanks for this, and the other patch you sent. I'll be picking them up
> this weekend, unless Catalin beats me to it.

BTW, I think at some point we could change to using Git's native
colouring. The diffcol.sh script is from the days when Git didn't have
this feature. We currently generate a diff string and pass it through
the pager but I'm not sure how to do this.

-- 
Catalin

```
