summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1ef9e05)
raw | patch | inline | side by side (parent: 1ef9e05)
author | Dennis Stosberg <dennis@stosberg.net> | |
Tue, 27 Jun 2006 16:54:26 +0000 (18:54 +0200) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 27 Jun 2006 17:56:05 +0000 (10:56 -0700) |
Some implementations of "expr" (e.g. FreeBSD's) fail, if an
argument starts with a dash.
Signed-off-by: Dennis Stosberg <dennis@stosberg.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
argument starts with a dash.
Signed-off-by: Dennis Stosberg <dennis@stosberg.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-am.sh | patch | blob | history | |
git-clone.sh | patch | blob | history | |
git-commit.sh | patch | blob | history | |
git-merge.sh | patch | blob | history | |
git-pull.sh | patch | blob | history | |
git-quiltimport.sh | patch | blob | history | |
git-rebase.sh | patch | blob | history |
diff --git a/git-am.sh b/git-am.sh
index 4232e27411036e339f8102e45b7cb699c808a798..679045a540c60e747074a9127bb7003f8a510b1c 100755 (executable)
--- a/git-am.sh
+++ b/git-am.sh
do
case "$1" in
-d=*|--d=*|--do=*|--dot=*|--dote=*|--dotes=*|--dotest=*)
- dotest=`expr "$1" : '-[^=]*=\(.*\)'`; shift ;;
+ dotest=`expr "z$1" : 'z-[^=]*=\(.*\)'`; shift ;;
-d|--d|--do|--dot|--dote|--dotes|--dotest)
case "$#" in 1) usage ;; esac; shift
dotest="$1"; shift;;
diff --git a/git-clone.sh b/git-clone.sh
index 6fa0daaacf4c677890768037c128d1d5e967a254..6a14b2591136d0bbfbec333c2304a7f003134ac2 100755 (executable)
--- a/git-clone.sh
+++ b/git-clone.sh
*,--reference)
shift; reference="$1" ;;
*,--reference=*)
- reference=`expr "$1" : '--reference=\(.*\)'` ;;
+ reference=`expr "z$1" : 'z--reference=\(.*\)'` ;;
*,-o|*,--or|*,--ori|*,--orig|*,--origi|*,--origin)
case "$2" in
'')
diff --git a/git-commit.sh b/git-commit.sh
index d7f3ade493762140c9a5a888ac67f8435e737f10..7e50cf399b70a5ec26824f0bf5b5210dbe06aedc 100755 (executable)
--- a/git-commit.sh
+++ b/git-commit.sh
-F*|-f*)
no_edit=t
log_given=t$log_given
- logfile=`expr "$1" : '-[Ff]\(.*\)'`
+ logfile=`expr "z$1" : 'z-[Ff]\(.*\)'`
shift
;;
--F=*|--f=*|--fi=*|--fil=*|--file=*)
no_edit=t
log_given=t$log_given
- logfile=`expr "$1" : '-[^=]*=\(.*\)'`
+ logfile=`expr "z$1" : 'z-[^=]*=\(.*\)'`
shift
;;
-a|--a|--al|--all)
shift
;;
--au=*|--aut=*|--auth=*|--autho=*|--author=*)
- force_author=`expr "$1" : '-[^=]*=\(.*\)'`
+ force_author=`expr "z$1" : 'z-[^=]*=\(.*\)'`
shift
;;
--au|--aut|--auth|--autho|--author)
log_given=m$log_given
if test "$log_message" = ''
then
- log_message=`expr "$1" : '-m\(.*\)'`
+ log_message=`expr "z$1" : 'z-m\(.*\)'`
else
log_message="$log_message
-`expr "$1" : '-m\(.*\)'`"
+`expr "z$1" : 'z-m\(.*\)'`"
fi
no_edit=t
shift
log_given=m$log_given
if test "$log_message" = ''
then
- log_message=`expr "$1" : '-[^=]*=\(.*\)'`
+ log_message=`expr "z$1" : 'z-[^=]*=\(.*\)'`
else
log_message="$log_message
-`expr "$1" : '-[^=]*=\(.*\)'`"
+`expr "z$1" : 'zq-[^=]*=\(.*\)'`"
fi
no_edit=t
shift
--reedit-me=*|--reedit-mes=*|--reedit-mess=*|--reedit-messa=*|\
--reedit-messag=*|--reedit-message=*)
log_given=t$log_given
- use_commit=`expr "$1" : '-[^=]*=\(.*\)'`
+ use_commit=`expr "z$1" : 'z-[^=]*=\(.*\)'`
no_edit=
shift
;;
--reuse-mes=*|--reuse-mess=*|--reuse-messa=*|--reuse-messag=*|\
--reuse-message=*)
log_given=t$log_given
- use_commit=`expr "$1" : '-[^=]*=\(.*\)'`
+ use_commit=`expr "z$1" : 'z-[^=]*=\(.*\)'`
no_edit=t
shift
;;
diff --git a/git-merge.sh b/git-merge.sh
index fc25f8dda01ecf4733165308d9fb1fa80dffbe0c..24e3b507ef1f907e7146a2653189f45a92db08fd 100755 (executable)
--- a/git-merge.sh
+++ b/git-merge.sh
-s|--s|--st|--str|--stra|--strat|--strate|--strateg|--strategy)
case "$#,$1" in
*,*=*)
- strategy=`expr "$1" : '-[^=]*=\(.*\)'` ;;
+ strategy=`expr "z$1" : 'z-[^=]*=\(.*\)'` ;;
1,*)
usage ;;
*)
diff --git a/git-pull.sh b/git-pull.sh
index aa8c2080927661cca281fca543dc5f0808f678e3..076785c96b30b4fd8ab944324fd53db7c584567a 100755 (executable)
--- a/git-pull.sh
+++ b/git-pull.sh
-s|--s|--st|--str|--stra|--strat|--strate|--strateg|--strategy)
case "$#,$1" in
*,*=*)
- strategy=`expr "$1" : '-[^=]*=\(.*\)'` ;;
+ strategy=`expr "z$1" : 'z-[^=]*=\(.*\)'` ;;
1,*)
usage ;;
*)
diff --git a/git-quiltimport.sh b/git-quiltimport.sh
index 12d9d0cbc9e0c5df0f1094f3ff4235d8657c896e..86b51abd21748c19235a703b1b523525d05383cd 100755 (executable)
--- a/git-quiltimport.sh
+++ b/git-quiltimport.sh
do
case "$1" in
--au=*|--aut=*|--auth=*|--autho=*|--author=*)
- quilt_author=$(expr "$1" : '-[^=]*\(.*\)')
+ quilt_author=$(expr "z$1" : 'z-[^=]*\(.*\)')
shift
;;
;;
--pa=*|--pat=*|--patc=*|--patch=*|--patche=*|--patches=*)
- QUILT_PATCHES=$(expr "$1" : '-[^=]*\(.*\)')
+ QUILT_PATCHES=$(expr "z$1" : 'z-[^=]*\(.*\)')
shift
;;
diff --git a/git-rebase.sh b/git-rebase.sh
index 9ad1c44d4816f8c4f52eddc525bc24cd6bfe92d2..0ac085e14aa5d11ece6a537008578cc7686680ba 100755 (executable)
--- a/git-rebase.sh
+++ b/git-rebase.sh
-s|--s|--st|--str|--stra|--strat|--strate|--strateg|--strategy)
case "$#,$1" in
*,*=*)
- strategy=`expr "$1" : '-[^=]*=\(.*\)'` ;;
+ strategy=`expr "z$1" : 'z-[^=]*=\(.*\)'` ;;
1,*)
usage ;;
*)