fi
# loop on modified files
- git diff --cached --name-only $against |while read file;
+ git diff --cached --name-only $against | while read file;
do
local ext=$(expr "$file" : ".*\(\..*\)")
case $ext in
# Indent the file with `indent' if this is a R file
__indent_R() {
- if test ! -x "$INDENT"
- then
- return;
- fi
if test ! -f $file
then
return;
echo "Indenting " $file
echo "library(formatR);formatR::tidy_source('$file',comment=TRUE,blank=TRUE,
- arrow=TRUE,brace.newline=TRUE,indent=2,width.cutoff=80,file='$file')" | R --slave
+ arrow=TRUE,brace.newline=TRUE,indent=2,width.cutoff=90,file='$file')" | R --slave
git add "$file"
}