summaryrefslogtreecommitdiff
path: root/git-bisect.sh
diff options
context:
space:
mode:
authorChristian Couder <chriscool@tuxfamily.org>2009-04-24 06:29:00 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-05-10 07:30:28 (GMT)
commitde52f5a806f58c6b73b2e24768530213fab5a635 (patch)
tree825399dafc195ec411a7dfe6e144826a845512db /git-bisect.sh
parent503253771e93fd9f29c9f0773223d456677452c4 (diff)
downloadgit-de52f5a806f58c6b73b2e24768530213fab5a635.zip
git-de52f5a806f58c6b73b2e24768530213fab5a635.tar.gz
git-de52f5a806f58c6b73b2e24768530213fab5a635.tar.bz2
bisect: use "git rev-parse --sq-quote" instead of a custom "sq" function
As the "sq" function was the only place using Perl in "git-bisect.sh", this removes the Perl dependency in this script. While at it, we also remove the sed instruction in the Makefile that substituted @@PERL@@ with the Perl path in shell scripts, as this is not needed anymore. (It is now only needed in "git-instaweb.sh" but this command is dealt with separately in the Makefile.) Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-bisect.sh')
-rwxr-xr-xgit-bisect.sh16
1 files changed, 3 insertions, 13 deletions
diff --git a/git-bisect.sh b/git-bisect.sh
index e1f300b..786b7b9 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -33,16 +33,6 @@ require_work_tree
_x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'
_x40="$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40"
-sq() {
- @@PERL@@ -e '
- for (@ARGV) {
- s/'\''/'\'\\\\\'\''/g;
- print " '\''$_'\''";
- }
- print "\n";
- ' "$@"
-}
-
bisect_autostart() {
test -s "$GIT_DIR/BISECT_START" || {
echo >&2 'You need to start by "git bisect start"'
@@ -107,7 +97,7 @@ bisect_start() {
for arg; do
case "$arg" in --) has_double_dash=1; break ;; esac
done
- orig_args=$(sq "$@")
+ orig_args=$(git rev-parse --sq-quote "$@")
bad_seen=0
eval=''
while [ $# -gt 0 ]; do
@@ -147,7 +137,7 @@ bisect_start() {
# Write new start state.
#
echo "$start_head" >"$GIT_DIR/BISECT_START" &&
- sq "$@" >"$GIT_DIR/BISECT_NAMES" &&
+ git rev-parse --sq-quote "$@" >"$GIT_DIR/BISECT_NAMES" &&
eval "$eval" &&
echo "git bisect start$orig_args" >>"$GIT_DIR/BISECT_LOG" || exit
#
@@ -199,7 +189,7 @@ bisect_skip() {
*..*)
revs=$(git rev-list "$arg") || die "Bad rev input: $arg" ;;
*)
- revs=$(sq "$arg") ;;
+ revs=$(git rev-parse --sq-quote "$arg") ;;
esac
all="$all $revs"
done