diffcol.sh: Use /bin/bash explicitly
PATCH 1/1 diffcol.sh: Use /bin/bash explicitly
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:
Quoted 2 lines
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.
---contrib/diffcol.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
contrib/diffcol.sh +1 -1
@@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash
# Code copied from Quilt (http://savannah.nongnu.org/projects/quilt)
#
Quoted 3 lines · Shinya Kuribayashi
diffcol.shis based on Quilt, and Quilt is dependent on bash; Actually all Quilt scripts use/bin/bashwithout exceptions. Then it's good fordiffcol.shto 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.
Signature · 2 lines
Karl Hasselström, [email protected] www.treskal.com/kalle
2008/9/3 Karl Hasselström <[email protected]>:
Quoted 8 lines · Shinya Kuribayashi
Quoted 4 lines
diffcol.shis based on Quilt, and Quilt is dependent on bash; Actually all Quilt scripts use/bin/bashwithout exceptions. Then it's good fordiffcol.shto 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.
Signature · 1 line
Catalin