From: Gabriel Filion Date: Thu, 18 Mar 2010 13:30:22 GMT Subject: Re: [PATCH] pull: replace unnecessary sed invocation Message-ID: <4BA22AEE.8000606@gmail.com> In-Reply-To: <1268889045-21751-1-git-send-email-bebarino@gmail.com> On 2010-03-18 01:10, Stephen Boyd wrote: > Getting the shortened branch name is as easy as using the shell's > parameter expansion. > > curr_branch=$(git symbolic-ref -q HEAD) > -curr_branch_short=$(echo "$curr_branch" | sed "s|refs/heads/||") > +curr_branch_short="${curr_branch#refs/heads/}" This modification is a bashism. This syntax is not compatible with other shells. -- Gabriel Filion