From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Sep 21 21:01:48 2007 Return-Path: Delivered-To: freebsd-ports-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 152C516A418; Fri, 21 Sep 2007 21:01:48 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from pobox.codelabs.ru (pobox.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id AAC5413C4A6; Fri, 21 Sep 2007 21:01:47 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) DomainKey-Signature: a=rsa-sha1; q=dns; c=simple; s=one; d=codelabs.ru; h=Received:Date:From:To:Cc:Message-ID:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:Sender:X-Spam-Status:Subject; b=SQgVabzpTLdX/e1tXS3bfs5w4Sb6yn1KovDk4IuyulOXXu+e6c5ZU1y/CkSHgZ4l/9jSkyiItNeCWiiIER9i950k6Abvso9pgE54nvmFuLRhqZ04UW6O1AFxdN9F2VHIFioIHKmjnuQ8AoPlklq5pW35jhh/WjY/toBN0ZyN0y0=; Received: from void.codelabs.ru (void.codelabs.ru [144.206.177.25]) by pobox.codelabs.ru with esmtpsa (TLSv1:AES256-SHA:256) id 1IYpdC-0002BY-GH; Sat, 22 Sep 2007 01:01:46 +0400 Date: Sat, 22 Sep 2007 01:01:42 +0400 From: Eygene Ryabinkin To: FreeBSD-gnats-submit@FreeBSD.org, freebsd-ports-bugs@FreeBSD.org Message-ID: <20070921210142.GB97288@void.codelabs.ru> References: <20070921200426.D73AA1AF41C@void.codelabs.ru> <200709212010.l8LKA1Fe031020@freefall.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <200709212010.l8LKA1Fe031020@freefall.freebsd.org> Sender: rea-fbsd@codelabs.ru X-Spam-Status: No, score=-2.0 required=4.0 tests=ALL_TRUSTED,AWL,BAYES_50 Cc: anholt@freebsd.org Subject: Re: ports/116521: update git to 1.5.3.2 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Sep 2007 21:01:48 -0000 Found one more issue with 1.5.3.2: shell scripts are using constructs like 'while case "$#" in 0) break;; esac; do ... done' for argument parsing loop that does not need external commands invocation. This works great for bash that is /bin/sh for Linux, but original /bin/sh (that FreeBSD has) skips this cycle completely. The solution is to add the case branch '*) : ;;'. It does not add any external command invocation, but does its work since ':' always returns zero. Here is the patch that should be placed into the files/ directory: --- 1.5.3.2-while-case.patch begins here --- diff -urN ./git-am.sh ../git-1.5.3.2.new/git-am.sh --- ./git-am.sh 2007-09-19 22:02:17.000000000 +0400 +++ ../git-1.5.3.2.new/git-am.sh 2007-09-22 00:44:14.000000000 +0400 @@ -109,7 +109,7 @@ resolvemsg= resume= git_apply_opt= -while case "$#" in 0) break;; esac +while case "$#" in 0) break;; *) : ;; esac do case "$1" in -d=*|--d=*|--do=*|--dot=*|--dote=*|--dotes=*|--dotest=*) diff -urN ./git-clean.sh ../git-1.5.3.2.new/git-clean.sh --- ./git-clean.sh 2007-09-19 22:02:17.000000000 +0400 +++ ../git-1.5.3.2.new/git-clean.sh 2007-09-22 00:44:24.000000000 +0400 @@ -26,7 +26,7 @@ rm_refuse="echo Not removing" echo1="echo" -while case "$#" in 0) break ;; esac +while case "$#" in 0) break ;; *) : ;; esac do case "$1" in -d) diff -urN ./git-commit.sh ../git-1.5.3.2.new/git-commit.sh --- ./git-commit.sh 2007-09-19 22:02:17.000000000 +0400 +++ ../git-1.5.3.2.new/git-commit.sh 2007-09-22 00:44:40.000000000 +0400 @@ -89,7 +89,7 @@ only_include_assumed= untracked_files= templatefile="`git config commit.template`" -while case "$#" in 0) break;; esac +while case "$#" in 0) break;; *) : ;; esac do case "$1" in -F|--F|-f|--f|--fi|--fil|--file) diff -urN ./git-fetch.sh ../git-1.5.3.2.new/git-fetch.sh --- ./git-fetch.sh 2007-09-19 22:02:17.000000000 +0400 +++ ../git-1.5.3.2.new/git-fetch.sh 2007-09-22 00:44:46.000000000 +0400 @@ -27,7 +27,7 @@ no_progress= test -t 1 || no_progress=--no-progress quiet= -while case "$#" in 0) break ;; esac +while case "$#" in 0) break ;; *) : ;; esac do case "$1" in -a|--a|--ap|--app|--appe|--appen|--append) diff -urN ./git-filter-branch.sh ../git-1.5.3.2.new/git-filter-branch.sh --- ./git-filter-branch.sh 2007-09-19 22:02:17.000000000 +0400 +++ ../git-1.5.3.2.new/git-filter-branch.sh 2007-09-22 00:44:53.000000000 +0400 @@ -105,7 +105,7 @@ filter_subdir= orig_namespace=refs/original/ force= -while case "$#" in 0) usage;; esac +while case "$#" in 0) usage;; *) : ;; esac do case "$1" in --) diff -urN ./git-instaweb.sh ../git-1.5.3.2.new/git-instaweb.sh --- ./git-instaweb.sh 2007-09-19 22:02:17.000000000 +0400 +++ ../git-1.5.3.2.new/git-instaweb.sh 2007-09-22 00:44:59.000000000 +0400 @@ -61,7 +61,7 @@ test -f "$fqgitdir/pid" && kill `cat "$fqgitdir/pid"` } -while case "$#" in 0) break ;; esac +while case "$#" in 0) break ;; *) : ;; esac do case "$1" in --stop|stop) diff -urN ./git-ls-remote.sh ../git-1.5.3.2.new/git-ls-remote.sh --- ./git-ls-remote.sh 2007-09-19 22:02:17.000000000 +0400 +++ ../git-1.5.3.2.new/git-ls-remote.sh 2007-09-22 00:45:11.000000000 +0400 @@ -13,7 +13,7 @@ } exec= -while case "$#" in 0) break;; esac +while case "$#" in 0) break;; *) : ;; esac do case "$1" in -h|--h|--he|--hea|--head|--heads) diff -urN ./git-merge.sh ../git-1.5.3.2.new/git-merge.sh --- ./git-merge.sh 2007-09-19 22:02:17.000000000 +0400 +++ ../git-1.5.3.2.new/git-merge.sh 2007-09-22 00:45:28.000000000 +0400 @@ -122,7 +122,7 @@ case "$#" in 0) usage ;; esac have_message= -while case "$#" in 0) break ;; esac +while case "$#" in 0) break ;; *) : ;; esac do case "$1" in -n|--n|--no|--no-|--no-s|--no-su|--no-sum|--no-summ|\ diff -urN ./git-mergetool.sh ../git-1.5.3.2.new/git-mergetool.sh --- ./git-mergetool.sh 2007-09-19 22:02:17.000000000 +0400 +++ ../git-1.5.3.2.new/git-mergetool.sh 2007-09-22 00:45:39.000000000 +0400 @@ -268,7 +268,7 @@ cleanup_temp_files } -while case $# in 0) break ;; esac +while case $# in 0) break ;; *) : ;; esac do case "$1" in -t|--tool*) diff -urN ./git-pull.sh ../git-1.5.3.2.new/git-pull.sh --- ./git-pull.sh 2007-09-19 22:02:17.000000000 +0400 +++ ../git-1.5.3.2.new/git-pull.sh 2007-09-22 00:46:11.000000000 +0400 @@ -16,7 +16,7 @@ die "You are in the middle of a conflicted merge." strategy_args= no_summary= no_commit= squash= -while case "$#,$1" in 0) break ;; *,-*) ;; *) break ;; esac +while case "$#,$1" in 0) break ;; *,-*) : ;; *) break ;; esac do case "$1" in -n|--n|--no|--no-|--no-s|--no-su|--no-sum|--no-summ|\ diff -urN ./git-quiltimport.sh ../git-1.5.3.2.new/git-quiltimport.sh --- ./git-quiltimport.sh 2007-09-19 22:02:17.000000000 +0400 +++ ../git-1.5.3.2.new/git-quiltimport.sh 2007-09-22 00:46:23.000000000 +0400 @@ -5,7 +5,7 @@ dry_run="" quilt_author="" -while case "$#" in 0) break;; esac +while case "$#" in 0) break;; *) : ;; esac do case "$1" in --au=*|--aut=*|--auth=*|--autho=*|--author=*) diff -urN ./git-rebase--interactive.sh ../git-1.5.3.2.new/git-rebase--interactive.sh --- ./git-rebase--interactive.sh 2007-09-19 22:02:17.000000000 +0400 +++ ../git-1.5.3.2.new/git-rebase--interactive.sh 2007-09-22 00:46:30.000000000 +0400 @@ -317,7 +317,7 @@ done } -while case $# in 0) break ;; esac +while case $# in 0) break ;; *) : ;; esac do case "$1" in --continue) diff -urN ./git-rebase.sh ../git-1.5.3.2.new/git-rebase.sh --- ./git-rebase.sh 2007-09-19 22:02:17.000000000 +0400 +++ ../git-1.5.3.2.new/git-rebase.sh 2007-09-22 00:46:40.000000000 +0400 @@ -122,7 +122,7 @@ is_interactive () { test -f "$dotest"/interactive || - while case $#,"$1" in 0,|*,-i|*,--interactive) break ;; esac + while case $#,"$1" in 0,|*,-i|*,--interactive) break ;; *) : ;; esac do shift done && test -n "$1" diff -urN ./git-repack.sh ../git-1.5.3.2.new/git-repack.sh --- ./git-repack.sh 2007-09-19 22:02:17.000000000 +0400 +++ ../git-1.5.3.2.new/git-repack.sh 2007-09-22 00:47:07.000000000 +0400 @@ -9,7 +9,7 @@ no_update_info= all_into_one= remove_redundant= local= quiet= no_reuse= extra= -while case "$#" in 0) break ;; esac +while case "$#" in 0) break ;; *) : ;; esac do case "$1" in -n) no_update_info=t ;; diff -urN ./git-reset.sh ../git-1.5.3.2.new/git-reset.sh --- ./git-reset.sh 2007-09-19 22:02:17.000000000 +0400 +++ ../git-1.5.3.2.new/git-reset.sh 2007-09-22 00:47:18.000000000 +0400 @@ -11,7 +11,7 @@ update= reset_type=--mixed unset rev -while case $# in 0) break ;; esac +while case $# in 0) break ;; *) : ;; esac do case "$1" in --mixed | --soft | --hard) diff -urN ./git-submodule.sh ../git-1.5.3.2.new/git-submodule.sh --- ./git-submodule.sh 2007-09-19 22:02:17.000000000 +0400 +++ ../git-1.5.3.2.new/git-submodule.sh 2007-09-22 00:47:32.000000000 +0400 @@ -251,7 +251,7 @@ done } -while case "$#" in 0) break ;; esac +while case "$#" in 0) break ;; *) : ;; esac do case "$1" in add) --- 1.5.3.2-while-case.patch ends here --- This patch will be submitted to the mainstream Git, so it can be of no value for the next version. -- Eygene