Re: [PATCH 1/3] git-bisect: war on "sed"
- From
David Kastrup <dak@gnu.org>
- Date
- Nov 15, 2007, 10:14 UTC
- Message-ID
- <86hcjn4xy7.fsf@lola.quinscape.zz>
- In-Reply-To
- <473C1A29.2010703@op5.se>
Andreas Ericsson <ae@op5.se> writes:
Show 8 quoted lines
>> Wincent Colaiuta <win@wincent.com> writes:
>>> + echo "${head#refs/heads/}" >"$GIT_DIR/head-name"
>
> It says "remove refs/heads/ from the beginning of the string pointed
> to by $head".
>
> It's not a bashism. Some extensions to that syntax are though (I
> think).General replace anywhere.
> If you want to be sure of portability, use sed instead.
Guffaw.
> git uses this syntax often enough that it's worth using everywhere, > but usually only in porcelain commands which one can relatively > safely assume are run on at least decently up-to-date developer > workstations.
Huh? It is used throughout. That's why "make install" will install xxx.sh scripts as xxx after possibly replacing the initial #!/bin/sh line with a shell known to be reasonably conformant on a particular system.
-- David Kastrup