git rev-parse argument are not files, no need to try to find abs-path

This was causing some error message on Windows
This commit is contained in:
Norbert Thiebaud
2011-11-29 10:59:48 -06:00
parent 2e76553c7c
commit a7069c2aa2

7
g
View File

@@ -220,7 +220,11 @@ while shift ; do
exit 1 exit 1
} }
fi fi
if [ "$COMMAND" == "rev-parse" ] ; then
# this is not a file
FILES[$FILESNUM]="$PARAM"
FILESNUM=$(($FILESNUM+1))
else
# make the paths absolute # make the paths absolute
FILES[$FILESNUM]=$(perl -e 'use Cwd "abs_path"; print abs_path(shift);' "$PARAM") FILES[$FILESNUM]=$(perl -e 'use Cwd "abs_path"; print abs_path(shift);' "$PARAM")
if [ -z "${FILES[$FILESNUM]}" -o ! -e "${FILES[$FILESNUM]}" ] ; then if [ -z "${FILES[$FILESNUM]}" -o ! -e "${FILES[$FILESNUM]}" ] ; then
@@ -229,6 +233,7 @@ while shift ; do
fi fi
FILESNUM=$(($FILESNUM+1)) FILESNUM=$(($FILESNUM+1))
fi fi
fi
done done
# do it! # do it!