Re: [PATCH] rebase: support -X to pass through strategy options
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 3, 2010, 23:07 UTC
- Message-ID
- <7vaap3i9c0.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <7vd3u6uv41.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
> Looks good; thanks both.
I spoke too fast. You would need something like this on top to avoid confusing certain implementations of "expr" (e.g. FreeBSD 8.0).
git-rebase.sh | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/git-rebase.sh b/git-rebase.sh index b1743ea..7d1c5c3 100755 --- a/git-rebase.sh +++ b/git-rebase.sh @@ -302,9 +302,9 @@ do newopt="$2" shift ;; *,--strategy-option=*) - newopt="$(expr "$1" : '--strategy-option=\(.*\)')" ;; + newopt="$(expr " $1" : ' --strategy-option=\(.*\)')" ;; *,-X*) - newopt="$(expr "$1" : '-X\(.*\)')" ;; + newopt="$(expr " $1" : ' -X\(.*\)')" ;; 1,*) usage ;; esac