df7c3e757825d829e6573ce03d0559bc63327fb3 galt Thu Nov 1 01:57:12 2018 -0700 fix gilt to handle wider pathnames. default 80 not long enough. do not like shorted paths with .../ diff --git src/utils/gitTools/gilt src/utils/gitTools/gilt index ed2a68e..e1445f7 100755 --- src/utils/gitTools/gilt +++ src/utils/gitTools/gilt @@ -13,32 +13,32 @@ -h) echo "$usage" 1>&2 exit 1 ;; *) echo "Error: invalid option: $opt" 1>&2 echo "$usage" 1>&2 exit 1 ;; esac done dir="$1" if [ "$dir" == "" ]; then dir="." fi onbranch=`git branch | grep '^[*]' | sed -e 's/* //'` mymaster=`git log HEAD ^origin/master | grep '^commit' | wc -l` omaster=`git log ^HEAD origin/master | grep '^commit' | wc -l` -staged=`git diff --stat --cached` -dirty=`git diff --stat $dir` +staged=`git diff --stat=255 --cached` +dirty=`git diff --stat=255 $dir` echo "On $onbranch branch." if [ "$mymaster" -gt "0" ] && [ "$omaster" -gt "0" ]; then echo "Your branch and 'origin/master' have diverged," echo "and have $mymaster and $omaster different commit(s) each, respectively." elif [ "$mymaster" -eq "0" ] && [ "$omaster" -gt "0" ]; then if [ "$omaster" -eq "1" ]; then plural="" else plural="s" fi echo "Your branch is behind 'origin/master' by $omaster commit$plural, and can be fast-forwarded." elif [ "$mymaster" -gt "0" ] && [ "$omaster" -eq "0" ]; then if [ "$mymaster" -eq "1" ]; then